File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ import isEmpty from 'lodash/isEmpty'
22
22
import { GqlError } from './utils/Alert'
23
23
24
24
function ExistingInvite ( {
25
- invite : { id, account, user } ,
25
+ inviteId,
26
+ invite : { account, user } ,
26
27
} : {
28
+ inviteId : string
27
29
invite : InviteFragment
28
30
} ) {
29
31
const [ mutation , { loading, error } ] = useRealizeInviteMutation ( {
30
- variables : { id } ,
32
+ variables : { id : inviteId } ,
31
33
onCompleted : ( { realizeInvite } ) => {
32
34
setToken ( realizeInvite ?. jwt )
33
35
; ( window as Window ) . location = '/'
@@ -109,7 +111,7 @@ export default function Invite() {
109
111
</ Flex >
110
112
)
111
113
112
- if ( ! invite )
114
+ if ( ! invite || ! inviteId )
113
115
return (
114
116
< Flex
115
117
grow = { 1 }
@@ -125,7 +127,13 @@ export default function Invite() {
125
127
confirm
126
128
)
127
129
128
- if ( invite . user ) return < ExistingInvite invite = { invite } />
130
+ if ( invite . user )
131
+ return (
132
+ < ExistingInvite
133
+ inviteId = { inviteId }
134
+ invite = { invite }
135
+ />
136
+ )
129
137
130
138
const submitEnabled = ! isEmpty ( name ) && ! passwordDisabled
131
139
const onSubmit = ( e ) => {
You can’t perform that action at this time.
0 commit comments