Compare commits

..

No commits in common. "5e9594e65c0798c3a1710af2ace94c121092d70d" and "72251d9f4054317bd74039c5539b00bef77652b2" have entirely different histories.

5 changed files with 8 additions and 23 deletions

View File

@ -170,8 +170,6 @@ export const AppBar = () => {
</MenuItem> </MenuItem>
<MenuItem <MenuItem
onClick={() => { onClick={() => {
setAnchorElUser(null)
navigate(appPrivateRoutes.relays) navigate(appPrivateRoutes.relays)
}} }}
sx={{ sx={{

View File

@ -86,20 +86,15 @@ export class AuthController {
store.dispatch(setRelayMapAction(relayMap.map)) store.dispatch(setRelayMapAction(relayMap.map))
} }
const currentLocation = window.location.hash.replace('#', '') const visitedLink = getVisitedLink()
if (!Object.values(appPrivateRoutes).includes(currentLocation)) { if (visitedLink) {
// User did change the location to one of the private routes const { pathname, search } = visitedLink
const visitedLink = getVisitedLink()
if (visitedLink) { return Promise.resolve(`${pathname}${search}`)
const { pathname, search } = visitedLink } else {
// Navigate user in
return Promise.resolve(`${pathname}${search}`) return Promise.resolve(appPrivateRoutes.homePage)
} else {
// Navigate user in
return Promise.resolve(appPrivateRoutes.homePage)
}
} }
} }

View File

@ -82,8 +82,7 @@ export const Login = () => {
const redirectPath = const redirectPath =
await authController.authAndGetMetadataAndRelaysMap(pubkey) await authController.authAndGetMetadataAndRelaysMap(pubkey)
if (redirectPath) navigateAfterLogin(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)

View File

@ -71,12 +71,6 @@ 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

View File

@ -2,7 +2,6 @@
.container { .container {
margin-top: 25px; margin-top: 25px;
color: $text-color;
.relayURItextfield { .relayURItextfield {
width: 100%; width: 100%;