Compare commits
4 Commits
72251d9f40
...
5e9594e65c
Author | SHA1 | Date | |
---|---|---|---|
|
5e9594e65c | ||
|
0280ebade5 | ||
|
3b704d2500 | ||
|
5e1d63289b |
@ -170,6 +170,8 @@ export const AppBar = () => {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
setAnchorElUser(null)
|
||||||
|
|
||||||
navigate(appPrivateRoutes.relays)
|
navigate(appPrivateRoutes.relays)
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
|
@ -86,6 +86,10 @@ export class AuthController {
|
|||||||
store.dispatch(setRelayMapAction(relayMap.map))
|
store.dispatch(setRelayMapAction(relayMap.map))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currentLocation = window.location.hash.replace('#', '')
|
||||||
|
|
||||||
|
if (!Object.values(appPrivateRoutes).includes(currentLocation)) {
|
||||||
|
// User did change the location to one of the private routes
|
||||||
const visitedLink = getVisitedLink()
|
const visitedLink = getVisitedLink()
|
||||||
|
|
||||||
if (visitedLink) {
|
if (visitedLink) {
|
||||||
@ -97,6 +101,7 @@ export class AuthController {
|
|||||||
return Promise.resolve(appPrivateRoutes.homePage)
|
return Promise.resolve(appPrivateRoutes.homePage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
checkSession() {
|
checkSession() {
|
||||||
const savedAuthToken = getAuthToken()
|
const savedAuthToken = getAuthToken()
|
||||||
|
@ -82,7 +82,8 @@ export const Login = () => {
|
|||||||
const redirectPath =
|
const redirectPath =
|
||||||
await authController.authAndGetMetadataAndRelaysMap(pubkey)
|
await authController.authAndGetMetadataAndRelaysMap(pubkey)
|
||||||
|
|
||||||
navigateAfterLogin(redirectPath)
|
if (redirectPath) navigateAfterLogin(redirectPath)
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.error('Error capturing public key from nostr extension: ' + err)
|
toast.error('Error capturing public key from nostr extension: ' + err)
|
||||||
|
@ -71,6 +71,12 @@ export const RelaysPage = () => {
|
|||||||
}
|
}
|
||||||
}, [relaysInfo, relaysState?.info])
|
}, [relaysInfo, relaysState?.info])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!compareObjects(relayMap, relaysState?.map)) {
|
||||||
|
setRelayMap(relaysState?.map)
|
||||||
|
}
|
||||||
|
}, [relayMap, relaysState?.map])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isMounted = false
|
let isMounted = false
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
|
color: $text-color;
|
||||||
|
|
||||||
.relayURItextfield {
|
.relayURItextfield {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Loading…
Reference in New Issue
Block a user