From 89b8e391c916bd8af8dec1ef38a06a02b00c47fe Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 11 Aug 2021 15:40:18 -0500 Subject: [PATCH] only display extra footer links on homepage --- components/footer.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/components/footer.js b/components/footer.js index 9cb88e7f..94aa29a3 100644 --- a/components/footer.js +++ b/components/footer.js @@ -7,8 +7,10 @@ import Texas from '../svgs/texas.svg' import Github from '../svgs/github-fill.svg' import Twitter from '../svgs/twitter-fill.svg' import Link from 'next/link' +import { useRouter } from 'next/router' export default function Footer () { + const router = useRouter() const query = gql` { connectAddress @@ -32,20 +34,23 @@ export default function Footer () { placeholder={data.connectAddress} /> } - - - FAQ - - - \ - - RSS - - \ - - Analytics - - \ + {router.asPath === '/' && + <> + + + FAQ + + + \ + + RSS + + \ + + Analytics + + \ + } This is free open source software