File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
client/web/src/components/modals Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,10 @@ enum InviteCodeType {
24
24
interface CreateInviteCodeProps {
25
25
groupId : string ;
26
26
onInviteCreated ?: ( ) => void ;
27
+ onInviteUpdated ?: ( ) => void ;
27
28
}
28
29
export const CreateInviteCode : React . FC < CreateInviteCodeProps > = React . memo (
29
- ( { groupId, onInviteCreated } ) => {
30
+ ( { groupId, onInviteCreated, onInviteUpdated } ) => {
30
31
const [ createdInvite , setCreateInvite ] = useState < GroupInvite | null > ( null ) ;
31
32
const [ { loading } , handleCreateInviteLink ] = useAsyncRequest (
32
33
async ( inviteType : InviteCodeType ) => {
@@ -64,6 +65,7 @@ export const CreateInviteCode: React.FC<CreateInviteCodeProps> = React.memo(
64
65
} as any )
65
66
) ;
66
67
closeModal ( key ) ;
68
+ onInviteUpdated ?.( ) ;
67
69
} }
68
70
/>
69
71
) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { CreateInviteCode } from './CreateInviteCode';
11
11
interface CreateGroupInviteProps {
12
12
groupId : string ;
13
13
onInviteCreated ?: ( ) => void ;
14
+ onInviteUpdated ?: ( ) => void ;
14
15
}
15
16
export const CreateGroupInvite : React . FC < CreateGroupInviteProps > = React . memo (
16
17
( props ) => {
@@ -52,6 +53,7 @@ export const CreateGroupInvite: React.FC<CreateGroupInviteProps> = React.memo(
52
53
< CreateInviteCode
53
54
groupId = { groupId }
54
55
onInviteCreated = { props . onInviteCreated }
56
+ onInviteUpdated = { props . onInviteUpdated }
55
57
/>
56
58
</ ModalWrapper >
57
59
) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ export const GroupInvite: React.FC<{
39
39
onInviteCreated = { ( ) => {
40
40
refresh ( ) ;
41
41
} }
42
+ onInviteUpdated = { ( ) => {
43
+ refresh ( ) ;
44
+ } }
42
45
/>
43
46
) ;
44
47
} ) ;
You can’t perform that action at this time.
0 commit comments