Skip to content

Commit 8f79d59

Browse files
committed
login modal
1 parent 2165273 commit 8f79d59

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

components/Login/login.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { useAppDispatch } from "../hooks"
2+
import {
3+
SignInWithButton,
4+
signOutAndRedirectToHome,
5+
useAuth
6+
} from "components/auth"
7+
import { AuthFlowStep, authStepChanged } from "components/auth/redux"
8+
import { useTranslation } from "next-i18next"
9+
import { useContext, useEffect, useState } from "react"
10+
11+
export default function LoginPage() {
12+
const { t } = useTranslation("auth")
13+
const dispatch = useAppDispatch()
14+
const setCurrentModal = (step: AuthFlowStep) =>
15+
dispatch(authStepChanged(step))
16+
17+
useEffect(() => {
18+
setCurrentModal("start")
19+
})
20+
21+
return (
22+
<div>
23+
<p>Hello Login World</p>
24+
<br />
25+
<p>handle if arriving on page but already logged in</p>
26+
</div>
27+
)
28+
}

pages/login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import LoginPage from "components/Login/login"
12
import { createPage } from "../components/page"
2-
import { UnsubscribeConfirm } from "../components/Email/unsubscribe"
33
import { createGetStaticTranslationProps } from "components/translations"
44

55
export default createPage({
66
title: "Login",
77
Page: () => {
8-
return <div>Hello World</div>
8+
return <LoginPage />
99
}
1010
})
1111

0 commit comments

Comments
 (0)