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'
2222import { GqlError } from './utils/Alert'
2323
2424function ExistingInvite ( {
25- invite : { id, account, user } ,
25+ inviteId,
26+ invite : { account, user } ,
2627} : {
28+ inviteId : string
2729 invite : InviteFragment
2830} ) {
2931 const [ mutation , { loading, error } ] = useRealizeInviteMutation ( {
30- variables : { id } ,
32+ variables : { id : inviteId } ,
3133 onCompleted : ( { realizeInvite } ) => {
3234 setToken ( realizeInvite ?. jwt )
3335 ; ( window as Window ) . location = '/'
@@ -109,7 +111,7 @@ export default function Invite() {
109111 </ Flex >
110112 )
111113
112- if ( ! invite )
114+ if ( ! invite || ! inviteId )
113115 return (
114116 < Flex
115117 grow = { 1 }
@@ -125,7 +127,13 @@ export default function Invite() {
125127 confirm
126128 )
127129
128- if ( invite . user ) return < ExistingInvite invite = { invite } />
130+ if ( invite . user )
131+ return (
132+ < ExistingInvite
133+ inviteId = { inviteId }
134+ invite = { invite }
135+ />
136+ )
129137
130138 const submitEnabled = ! isEmpty ( name ) && ! passwordDisabled
131139 const onSubmit = ( e ) => {
You can’t perform that action at this time.
0 commit comments