chore: remove usage of styled-jsx

This commit is contained in:
Divlo
2022-12-13 22:31:32 +01:00
parent e8a9ce4e69
commit 67a1699102
23 changed files with 345 additions and 454 deletions

View File

@ -3,9 +3,7 @@ import useTranslation from 'next-translate/useTranslation'
import { ErrorPage } from '../components/ErrorPage'
import { Head } from '../components/Head'
import { Header } from '../components/Header'
import type { FooterProps } from '../components/Footer'
import { Footer } from '../components/Footer'
const Error404: NextPage<FooterProps> = (props) => {
const { t } = useTranslation()
@ -14,12 +12,11 @@ const Error404: NextPage<FooterProps> = (props) => {
return (
<>
<Head title='Thream | 404' />
<Header />
<main className='flex flex-col md:mx-auto md:max-w-4xl lg:max-w-7xl'>
<ErrorPage statusCode={404} message={t('errors:page-not-found')} />
</main>
<Footer version={version} />
<ErrorPage
statusCode={404}
message={t('errors:page-not-found')}
version={version}
/>
</>
)
}

View File

@ -5,7 +5,6 @@ import { ErrorPage } from '../components/ErrorPage'
import { Head } from '../components/Head'
import { Header } from '../components/Header'
import type { FooterProps } from '../components/Footer'
import { Footer } from '../components/Footer'
const Error500: NextPage<FooterProps> = (props) => {
const { t } = useTranslation()
@ -16,10 +15,11 @@ const Error500: NextPage<FooterProps> = (props) => {
<Head title='Thream | 500' />
<Header />
<main className='flex flex-col md:mx-auto md:max-w-4xl lg:max-w-7xl'>
<ErrorPage statusCode={500} message={t('errors:server-error')} />
</main>
<Footer version={version} />
<ErrorPage
statusCode={500}
message={t('errors:server-error')}
version={version}
/>
</>
)
}

View File

@ -15,7 +15,6 @@ import { Input } from '../../components/design/Input'
import { Button } from '../../components/design/Button'
import { FormState } from '../../components/design/FormState'
import { authenticationFromServerSide } from '../../tools/authentication'
import { ScrollableBody } from '../../components/ScrollableBody'
import { userSchema } from '../../models/User'
import { api } from '../../tools/api'
import { useFormTranslation } from '../../hooks/useFormTranslation'
@ -60,7 +59,7 @@ const ForgotPassword: NextPage<FooterProps> = (props) => {
}
return (
<ScrollableBody>
<>
<Head title={`Thream | ${t('authentication:forgot-password')}`} />
<Header />
<Main>
@ -86,7 +85,7 @@ const ForgotPassword: NextPage<FooterProps> = (props) => {
/>
</Main>
<Footer version={version} />
</ScrollableBody>
</>
)
}

View File

@ -15,7 +15,6 @@ import { Input } from '../../components/design/Input'
import { Button } from '../../components/design/Button'
import { authenticationFromServerSide } from '../../tools/authentication'
import { AuthenticationForm } from '../../components/Authentication'
import { ScrollableBody } from '../../components/ScrollableBody'
import { api } from '../../tools/api'
import { userSchema } from '../../models/User'
import { useFormTranslation } from '../../hooks/useFormTranslation'
@ -55,7 +54,7 @@ const ResetPassword: NextPage<FooterProps> = (props) => {
}
return (
<ScrollableBody>
<>
<Head title={`Thream | ${t('authentication:reset-password')}`} />
<Header />
<Main>
@ -81,7 +80,7 @@ const ResetPassword: NextPage<FooterProps> = (props) => {
/>
</Main>
<Footer version={version} />
</ScrollableBody>
</>
)
}

View File

@ -7,19 +7,18 @@ import { Header } from '../../components/Header'
import type { FooterProps } from '../../components/Footer'
import { Footer } from '../../components/Footer'
import { authenticationFromServerSide } from '../../tools/authentication'
import { ScrollableBody } from '../../components/ScrollableBody'
const Signin: NextPage<FooterProps> = (props) => {
const { version } = props
const { t } = useTranslation()
return (
<ScrollableBody>
<>
<Head title={`Thream | ${t('authentication:signin')}`} />
<Header />
<Authentication mode='signin' />
<Footer version={version} />
</ScrollableBody>
</>
)
}

View File

@ -7,19 +7,18 @@ import { Header } from '../../components/Header'
import type { FooterProps } from '../../components/Footer'
import { Footer } from '../../components/Footer'
import { authenticationFromServerSide } from '../../tools/authentication'
import { ScrollableBody } from '../../components/ScrollableBody'
const Signup: NextPage<FooterProps> = (props) => {
const { version } = props
const { t } = useTranslation()
return (
<ScrollableBody>
<>
<Head title={`Thream | ${t('authentication:signup')}`} />
<Header />
<Authentication mode='signup' />
<Footer version={version} />
</ScrollableBody>
</>
)
}

View File

@ -11,14 +11,13 @@ import type { FooterProps } from '../components/Footer'
import { Footer } from '../components/Footer'
import { SocialMediaLink } from '../components/design/SocialMediaButton'
import { ButtonLink } from '../components/design/Button'
import { ScrollableBody } from '../components/ScrollableBody'
const Home: NextPage<FooterProps> = (props) => {
const { t } = useTranslation()
const { version } = props
return (
<ScrollableBody>
<>
<Head />
<Header />
<Main>
@ -71,7 +70,7 @@ const Home: NextPage<FooterProps> = (props) => {
</div>
</Main>
<Footer version={version} />
</ScrollableBody>
</>
)
}