-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.tsx
50 lines (46 loc) · 1.64 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Head from "next/head";
import React from "react";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { wrapper } from "@/web/store/store";
import { NextWrapper } from "@/web/next-helpers/page-wrapper";
import { GetStaticProps, GetStaticPropsContext } from "next";
import { Main } from "@/web/feature/home/main";
import ProtectedNextComponent from "@/web/feature/protected-next-component";
import { STRING_CONSTANTS } from "@/common/string-constants";
import { UserSettings } from "@/web/feature/profile/containers/user-settings";
const TRANSLATION_NAMESPACES = ["common"];
export default function NewCaptionerPage(): JSX.Element {
const metaTitle = "NekoCap - Settings";
const metaDescription = STRING_CONSTANTS.metaDescription;
return (
<>
<Head>
<>
<title>{metaTitle}</title>
<meta property="og:title" content={metaTitle} />
<meta property="og:description" content={metaDescription} />
<meta name="twitter:title" content={metaTitle} />
<meta name="twitter:description" content={metaDescription} />
<meta name="twitter:site" content="@NekoCaption"></meta>
</>
</Head>
<Main>
<ProtectedNextComponent>
<UserSettings />
</ProtectedNextComponent>
</Main>
</>
);
}
export const getStaticProps: GetStaticProps = NextWrapper.getStaticProps(
wrapper.getStaticProps(
() =>
async ({ locale = "en-US" }: GetStaticPropsContext) => {
return {
props: {
...(await serverSideTranslations(locale, TRANSLATION_NAMESPACES)),
},
};
}
)
);