-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsign-up.tsx
More file actions
39 lines (33 loc) · 1.08 KB
/
Copy pathsign-up.tsx
File metadata and controls
39 lines (33 loc) · 1.08 KB
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
import { NextPage } from "next";
import { useTranslation } from "next-i18next";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { useDispatch } from "react-redux";
import LoginView from "../components/Login/LoginView";
import actions from "../store/actions";
import Seo from "../components/Seo";
import { GetLocale } from "../utils/GetLocale";
const SignUpPage: NextPage<{ sitekey: string }> = ({ sitekey }) => {
const { t } = useTranslation();
const dispatch = useDispatch();
dispatch(actions.setSitekey(sitekey));
return (
<>
<Seo
title={t("login:signup")}
description={t("login:signupFormHeader")}
/>
<LoginView isSignUp />
</>
);
};
export async function getServerSideProps({ locale, locales, req, query }) {
locale = GetLocale(req, locale, locales);
query = JSON.parse(query.props);
return {
props: {
...(await serverSideTranslations(locale)),
sitekey: query.sitekey,
},
};
}
export default SignUpPage;