refactor(pages): clean up

This commit is contained in:
Walid 2023-02-10 12:42:32 +01:00
parent d10a35d1d2
commit 031e813c72
Signed by: Walidoux
GPG Key ID: CCF21881FE8BEBAF
2 changed files with 14 additions and 11 deletions

View File

@ -10,7 +10,6 @@ import { useEffect } from 'react'
const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => { const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {
const { lang } = useTranslation() const { lang } = useTranslation()
// 10 years before cookie's expiration
const COOKIE_EXPIRATION = 10 * 365.25 * 24 * 60 * 60 const COOKIE_EXPIRATION = 10 * 365.25 * 24 * 60 * 60
useEffect(() => { useEffect(() => {

View File

@ -3,28 +3,32 @@ import type { NextPage } from 'next'
import Link from 'next/link' import Link from 'next/link'
import useTranslation from 'next-translate/useTranslation' import useTranslation from 'next-translate/useTranslation'
import { FiGithub } from 'react-icons/fi' import { FiGithub } from 'react-icons/fi'
import { Fragment } from 'react'
const Home: NextPage = () => { const Home: NextPage = () => {
const { t } = useTranslation() const { t } = useTranslation()
return ( return (
<main className='flex min-h-screen max-w-full flex-col items-center justify-center bg-gradient-to-br from-primary to-secondary'> <Fragment>
<NextHead /> <NextHead />
<p className='px-3 text-center text-4xl italic text-white'> <main className='flex min-h-screen max-w-full flex-col items-center justify-center bg-gradient-to-br from-primary to-secondary'>
{t('home:title')} <br /> <p className='px-3 text-center text-4xl italic text-white'>
<span className='px-3 text-center text-lg italic text-white opacity-90'> {t('home:title')}
</p>
<span className='mt-3 px-3 text-center text-lg italic text-white/90'>
{t('home:subtitle')} {t('home:subtitle')}
</span> </span>
</p>
<Link href='https://github.com/Walidoux/next-app-boilerplate'> <Link
<a className='mt-7 flex cursor-pointer items-center justify-center rounded-xl border-none bg-white bg-none py-[10px] px-6 font-semibold text-black no-underline outline-none transition duration-300 hover:bg-black hover:text-white'> target='_blank'
href='https://github.com/Walidoux/next-app-boilerplate'
className='mt-7 flex cursor-pointer items-center justify-center rounded-xl border-none bg-white/80 bg-none py-[10px] px-6 font-semibold text-black no-underline outline-none transition duration-300 hover:bg-black/50 hover:text-white'>
<FiGithub fontSize={20} /> <FiGithub fontSize={20} />
<span className='ml-3'>{t('common:repo-github')}</span> <span className='ml-3'>{t('common:repo-github')}</span>
</a> </Link>
</Link> </main>
</main> </Fragment>
) )
} }