File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { FirebaseError } from 'firebase/app'
2
2
import { ref } from 'vue'
3
- import { useRouter } from 'vue-router'
3
+ import { useRoute , useRouter } from 'vue-router'
4
4
5
5
import { useErrorHandling } from '@/composables/useErrorHandling'
6
6
import { t } from '@/i18n'
@@ -16,6 +16,7 @@ import { usdToMicros } from '@/utils/formatUtil'
16
16
export const useFirebaseAuthActions = ( ) => {
17
17
const authStore = useFirebaseAuthStore ( )
18
18
const toastStore = useToastStore ( )
19
+ const route = useRoute ( )
19
20
const router = useRouter ( )
20
21
const { wrapWithErrorHandlingAsync, toastErrorHandler } = useErrorHandling ( )
21
22
@@ -57,7 +58,12 @@ export const useFirebaseAuthActions = () => {
57
58
// Redirect to login page if we're on cloud domain
58
59
const hostname = window . location . hostname
59
60
if ( hostname . includes ( 'cloud.comfy.org' ) ) {
60
- await router . push ( { name : 'cloud-login' } )
61
+ if ( route . query . inviteCode ) {
62
+ const inviteCode = route . query . inviteCode
63
+ await router . push ( { name : 'cloud-login' , query : { inviteCode } } )
64
+ } else {
65
+ await router . push ( { name : 'cloud-login' } )
66
+ }
61
67
}
62
68
} , reportError )
63
69
You can’t perform that action at this time.
0 commit comments