File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ import { getProfileRow } from 'common/love/profile'
55
66export const signupThenMaybeRedirectToSignup = async ( ) => {
77 const creds = await firebaseLogin ( )
8- await Router . push ( '/' )
98 const userId = creds ?. user . uid
109 if ( userId ) {
1110 const profile = await getProfileRow ( userId , db )
12- if ( ! profile ) {
11+ if ( profile ) {
12+ await Router . push ( '/' )
13+ } else {
1314 await Router . push ( '/signup' )
1415 }
1516 }
Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ function RegisterComponent() {
4444 if ( user ) {
4545 const profile = await getProfileRow ( user . id , db )
4646 if ( profile ) {
47+ console . log ( "Router.push('/')" )
4748 await Router . push ( '/' )
4849 } else {
50+ console . log ( "Router.push('/signup')" )
4951 await Router . push ( '/signup' )
5052 }
5153 setIsLoading ( false ) ;
Original file line number Diff line number Diff line change @@ -84,13 +84,14 @@ export default function SignupPage() {
8484 }
8585
8686 if ( user === null && ! holdLoading ) {
87- router . push ( '/' )
87+ console . log ( 'user === null && !holdLoading' )
88+ return < CompassLoadingIndicator />
8889 }
8990
9091 return (
9192 < Col className = "items-center" >
9293 { ! user ? (
93- < LovePage trackPageView = { 'register' } > < CompassLoadingIndicator /> </ LovePage >
94+ < CompassLoadingIndicator />
9495 ) : (
9596 < Col className = { 'w-full max-w-2xl px-6 py-4' } >
9697 { step === 0 ? (
@@ -131,7 +132,7 @@ export default function SignupPage() {
131132 } }
132133 />
133134 ) : step === 1 ? (
134- < > < />
135+ < CompassLoadingIndicator />
135136 ) : (
136137 < CompassLoadingIndicator />
137138 ) }
You can’t perform that action at this time.
0 commit comments