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,20 +34,23 @@ export default function Footer () {
placeholder={data.connectAddress} placeholder={data.connectAddress}
/> />
</div>} </div>}
<Link href='/faq' passHref> {router.asPath === '/' &&
<a className='text-dark d-inline-flex'> <>
FAQ <Link href='/faq' passHref>
</a> <a className='text-dark d-inline-flex'>
</Link> FAQ
<span className='text-muted mx-2'> \ </span> </a>
<a href='/rss' className='text-dark d-inline-flex' target='_blank'> </Link>
RSS <span className='text-muted mx-2'> \ </span>
</a> <a href='/rss' className='text-dark d-inline-flex' target='_blank'>
<span className='text-muted mx-2'> \ </span> RSS
<a href='https://plausible.io/stacker.news' className='text-dark d-inline-flex' target='_blank' rel='noreferrer'> </a>
Analytics <span className='text-muted mx-2'> \ </span>
</a> <a href='https://plausible.io/stacker.news' className='text-dark d-inline-flex' target='_blank' rel='noreferrer'>
<span className='text-muted mx-2'> \ </span> Analytics
</a>
<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' />