From 7c4fdced380491d30e685dc8a060a7927d97056e Mon Sep 17 00:00:00 2001 From: jonataspinto Date: Fri, 8 Mar 2024 18:28:58 -0300 Subject: [PATCH] fix(components/Footer): add condition to render link to doubts page --- src/components/Footer/index.tsx | 69 ++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 2fb3155..a35009d 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,38 +1,45 @@ import Link from 'next/link'; +import { usePathname } from 'next/navigation'; import { Logo } from '../Logo'; import { Typography } from '../Typography'; import { SocialShareButtons } from './SocialShareButtons'; import * as S from './styles'; -export const Footer = () => ( - - - - - - - - Estartando Devs +export const Footer = () => { + const pathName = usePathname(); + + return ( + + + + + + + + Estartando Devs + + + + + {!pathName.includes('/perguntas-frequentes') && ( + + {`Dúvidas? Veja as`} + + {`perguntas mais frequentes`} + + + )} + + + {`© Estartando Devs ${new Date().getFullYear()}`} - - - - - {`Dúvidas? Veja as`} - - {`perguntas mais frequentes`} - - - - - {`© Estartando Devs ${new Date().getFullYear()}`} - - - Todos os direitos reservados. - - - -); + + Todos os direitos reservados. + + + + ); +};