1
+ import { Alert , Button , Col , Form , Modal , Stack } from "../bootstrap"
1
2
import { useAppDispatch } from "../hooks"
2
3
import {
3
4
SignInWithButton ,
@@ -7,22 +8,45 @@ import {
7
8
import { AuthFlowStep , authStepChanged } from "components/auth/redux"
8
9
import { useTranslation } from "next-i18next"
9
10
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"
10
14
11
15
export default function LoginPage ( ) {
12
16
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))
16
20
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()
20
33
21
34
return (
22
35
< div >
23
36
< p > Hello Login World</ p >
24
37
< 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 >
26
50
</ div >
27
51
)
28
52
}
0 commit comments