Skip to content

Commit 0373117

Browse files
committed
basic links
1 parent 8f79d59 commit 0373117

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

components/Login/login.tsx

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Alert, Button, Col, Form, Modal, Stack } from "../bootstrap"
12
import { useAppDispatch } from "../hooks"
23
import {
34
SignInWithButton,
@@ -7,22 +8,45 @@ import {
78
import { AuthFlowStep, authStepChanged } from "components/auth/redux"
89
import { useTranslation } from "next-i18next"
910
import { useContext, useEffect, useState } from "react"
11+
import { useNavigate } from "react-router-dom"
12+
import { useLocation } from "react-router-dom"
13+
import { useRouter } from "next/router"
1014

1115
export default function LoginPage() {
1216
const { t } = useTranslation("auth")
13-
const dispatch = useAppDispatch()
14-
const setCurrentModal = (step: AuthFlowStep) =>
15-
dispatch(authStepChanged(step))
17+
// const dispatch = useAppDispatch()
18+
// const setCurrentModal = (step: AuthFlowStep) =>
19+
// dispatch(authStepChanged(step))
1620

17-
useEffect(() => {
18-
setCurrentModal("start")
19-
})
21+
// useEffect(() => {
22+
// setCurrentModal("start")
23+
// })
24+
25+
// const navigate = useNavigate()
26+
// const handleGoBack = () => {
27+
// navigate(-1) // Navigates back one entry in the history stack
28+
// }
29+
30+
const router = useRouter()
31+
32+
// const location = useLocation()
2033

2134
return (
2235
<div>
2336
<p>Hello Login World</p>
2437
<br />
25-
<p>handle if arriving on page but already logged in</p>
38+
<p>
39+
You were possibly signed out while trying to go to a page that needs you
40+
to be signed in
41+
</p>
42+
<br />
43+
<div>Please consider logging in first:</div>
44+
<div className="" style={{ width: "100px" }}>
45+
<SignInWithButton />
46+
</div>
47+
<br />
48+
<p>If logged in, try and provide user with link to prior navpoint</p>
49+
<p>Current Pathname: {router.pathname}</p>
2650
</div>
2751
)
2852
}

0 commit comments

Comments
 (0)