stacker.news/components/footer.js

35 lines
783 B
JavaScript
Raw Normal View History

2021-06-02 23:15:28 +00:00
import { useQuery } from '@apollo/client'
import gql from 'graphql-tag'
2021-06-02 23:31:07 +00:00
import { Container } from 'react-bootstrap'
2021-06-02 23:15:28 +00:00
import { CopyInput } from './form'
2021-06-04 01:55:23 +00:00
import styles from './footer.module.css'
2021-06-02 23:15:28 +00:00
export default function Footer () {
const query = gql`
{
connectAddress
}
`
const { data } = useQuery(query)
return (
<footer>
2021-06-02 23:31:07 +00:00
{data &&
<Container>
<div
2021-06-04 01:55:23 +00:00
className={`text-small my-3 mx-auto ${styles.connect}`}
2021-06-02 23:31:07 +00:00
>
2021-06-02 23:15:28 +00:00
<span className='nav-item text-muted mr-2'>connect:</span>
<CopyInput
size='sm'
2021-06-02 23:31:07 +00:00
groupClassName='mb-0 w-100'
2021-06-02 23:15:28 +00:00
readOnly
placeholder={data.connectAddress}
/>
</div>
2021-06-02 23:31:07 +00:00
</Container>}
2021-06-02 23:15:28 +00:00
</footer>
)
}