feat: Append qs to the root location when redirect from sign in
This commit is contained in:
parent
86748fb81c
commit
d9e0082ade
@ -25,7 +25,7 @@ function ConnectToWorld(props: Props) {
|
||||
|
||||
useEffect(() => {
|
||||
if (!loggedInAddress && !isLoading) {
|
||||
navigate(locations.signIn(locations.root()))
|
||||
navigate(locations.signIn(locations.root(worldsContentServerUrl)))
|
||||
}
|
||||
}, [isLoading, loggedInAddress])
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
export const locations = {
|
||||
root: () => '/',
|
||||
account: (address: string) => `/accounts/${address}`,
|
||||
root: (worldsContentServerUrl?: string) => '/' + (worldsContentServerUrl ? `?worlds-content-server-url=${worldsContentServerUrl}` : ''),
|
||||
signIn: (redirectTo?: string) => {
|
||||
return `/sign-in${redirectTo ? `?redirectTo=${encodeURIComponent(redirectTo)}` : ''}`
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user