only display extra footer links on homepage

This commit is contained in:
keyan 2021-08-11 15:40:18 -05:00
parent 9fce2154f6
commit 89b8e391c9
1 changed files with 19 additions and 14 deletions

View File

@ -7,8 +7,10 @@ import Texas from '../svgs/texas.svg'
import Github from '../svgs/github-fill.svg' import Github from '../svgs/github-fill.svg'
import Twitter from '../svgs/twitter-fill.svg' import Twitter from '../svgs/twitter-fill.svg'
import Link from 'next/link' import Link from 'next/link'
import { useRouter } from 'next/router'
export default function Footer () { export default function Footer () {
const router = useRouter()
const query = gql` const query = gql`
{ {
connectAddress connectAddress
@ -32,6 +34,8 @@ export default function Footer () {
placeholder={data.connectAddress} placeholder={data.connectAddress}
/> />
</div>} </div>}
{router.asPath === '/' &&
<>
<Link href='/faq' passHref> <Link href='/faq' passHref>
<a className='text-dark d-inline-flex'> <a className='text-dark d-inline-flex'>
FAQ FAQ
@ -46,6 +50,7 @@ export default function Footer () {
Analytics Analytics
</a> </a>
<span className='text-muted mx-2'> \ </span> <span className='text-muted mx-2'> \ </span>
</>}
<small> <small>
<a className='text-dark d-inline-flex' href='https://github.com/stackernews/stacker.news'> <a className='text-dark d-inline-flex' href='https://github.com/stackernews/stacker.news'>
This is free open source software <Github width={20} height={20} className='mx-1' /> This is free open source software <Github width={20} height={20} className='mx-1' />