1
0
Fork 0
freesewing/sites/org/pages/welcome/img.mjs

39 lines
1.1 KiB
JavaScript
Raw Normal View History

// Hooks
import { useApp } from 'site/hooks/useApp.mjs'
2023-01-26 19:31:23 +01:00
import { useTranslation } from 'next-i18next'
// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
// Components
import { PageWrapper } from 'site/components/wrappers/page.mjs'
import { BareLayout } from 'site/components/layouts/bare.mjs'
import { AuthWrapper, ns as authNs } from 'site/components/wrappers/auth/index.mjs'
import { ImgSettings, ns as imgNs } from 'site/components/account/img/index.mjs'
2023-01-26 19:31:23 +01:00
// Translation namespaces used on this page
const namespaces = [...imgNs, ...authNs]
const ImgPage = (props) => {
const app = useApp(props)
const { t } = useTranslation(namespaces)
return (
<PageWrapper app={app} title={t('title')} layout={BareLayout} footer={false}>
2023-01-26 19:31:23 +01:00
<AuthWrapper app={app}>
<div className="m-auto max-w-lg text-center lg:mt-12 p-8">
<ImgSettings app={app} title welcome />
</div>
</AuthWrapper>
</PageWrapper>
2023-01-26 19:31:23 +01:00
)
}
export default ImgPage
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, namespaces)),
2023-01-26 19:31:23 +01:00
},
}
}