1
0
Fork 0
freesewing/sites/org/pages/welcome/index.js

36 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-01-22 19:46:56 +01:00
import Page from 'site/components/wrappers/page.js'
import useApp from 'site/hooks/useApp.js'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { useTranslation } from 'next-i18next'
import Layout from 'site/components/layouts/bare'
import AuthWrapper, { namespaces as authNs } from 'site/components/wrappers/auth/index.js'
2023-01-23 20:23:53 +01:00
import ControlSettings, { namespaces as controlNs } from 'site/components/account/control/index.js'
2023-01-22 19:46:56 +01:00
// Translation namespaces used on this page
2023-01-23 20:23:53 +01:00
const namespaces = [...controlNs, ...authNs]
2023-01-22 19:46:56 +01:00
const WelcomePage = (props) => {
const app = useApp(props)
const { t } = useTranslation(namespaces)
return (
2023-01-23 20:23:53 +01:00
<Page app={app} title={t('title')} layout={Layout} footer={false}>
2023-01-22 19:46:56 +01:00
<AuthWrapper app={app}>
<div className="m-auto max-w-lg text-center lg:mt-12 p-8">
2023-01-23 20:23:53 +01:00
<ControlSettings app={app} title welcome />
2023-01-22 19:46:56 +01:00
</div>
</AuthWrapper>
</Page>
)
}
export default WelcomePage
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
}
}