Skip to content

Commit

Permalink
Merge pull request #1598 from lumi-tip/development-lumi-7672
Browse files Browse the repository at this point in the history
💄 footer is not visible during the guided experience
  • Loading branch information
tommygonzaleza authored Sep 10, 2024
2 parents edb37b3 + b215285 commit bf237f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/common/components/FooterTC.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ import {
} from '@chakra-ui/react';
import PropTypes from 'prop-types';
import useTranslation from 'next-translate/useTranslation';
import { useRouter } from 'next/router';
import logoData from '../../../public/logo.json';
import NextChakraLink from './NextChakraLink';
import useAuth from '../hooks/useAuth';

function FooterTC({ pageProps }) {
const { t } = useTranslation('footer');
const { isAuthenticated } = useAuth();
const copyrightName = pageProps?.existsWhiteLabel ? logoData.name : '4Geeks';
const actualYear = new Date().getFullYear();
const { isAuthenticated } = useAuth();
const router = useRouter();
const noFooterRoutes = ['/cohort/[cohortSlug]/[slug]/[version]', '/syllabus/[cohortSlug]/[lesson]/[lessonSlug]'];

if (noFooterRoutes.includes(router.pathname)) {
return null;
}

return (
<Container as={isAuthenticated && 'footer'} maxW>
Expand All @@ -25,7 +32,6 @@ function FooterTC({ pageProps }) {
padding="20px 20px 5px 20px"
justifyContent={['center', 'center', 'space-between', 'space-between']}
wrap={['wrap', 'wrap', 'nowrap', 'nowrap']}
// alignItems="center"
textAlign="center"
>
<Text marginBottom={['20px', '20px', '0', '0']} fontSize="sm">{t('copyright', { name: copyrightName, year: actualYear })}</Text>
Expand Down

0 comments on commit bf237f4

Please sign in to comment.