File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
- import { FC } from 'react' ;
1
+ import { FC , useState } from 'react' ;
2
2
import GroupFormNameInput from './GroupFormNameInput' ;
3
3
import GroupFormDescriptionInput from './GroupFormDescriptionInput' ;
4
4
import GroupFormDateInput from './GroupFormDateInput' ;
@@ -22,13 +22,15 @@ const GroupForm: FC<Props> = ({
22
22
memo = '' ,
23
23
onSubmit,
24
24
} ) => {
25
+ const [ member , setMember ] = useState < any [ ] > ( [ ] ) ;
26
+
25
27
return (
26
28
< form onSubmit = { onSubmit } className = "container mx-auto flex max-w-sm flex-1 flex-col gap-4 pb-[50px] pt-4" >
27
29
< div className = "flex h-full w-full flex-1 flex-col gap-4" >
28
30
< GroupFormNameInput name = { name } />
29
31
< GroupFormDescriptionInput description = { description } />
30
32
< GroupFormDateInput startDate = { startDate } endDate = { endDate } />
31
- < UserInvite />
33
+ < UserInvite member = { member } setMember = { setMember } />
32
34
< GroupFormMemoInput memo = { memo } />
33
35
</ div >
34
36
< button type = "submit" className = "btn btn-outline btn-primary w-full" >
Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ import UserInviteDialog from '@/components/common/UserInviteDialog';
6
6
import UserInvited from './UserInvited' ;
7
7
import UserInviteList from './UserInviteList.tsx' ;
8
8
9
- const UserInvite : FC = ( ) => {
9
+ interface Props {
10
+ member : any ;
11
+ setMember : any ;
12
+ }
13
+
14
+ const UserInvite : FC < Props > = ( { member, setMember } ) => {
10
15
const [ email , setEamil ] = useState ( '' ) ;
11
16
const [ list , setList ] = useState < any [ ] > ( [ ] ) ;
12
- const [ member , setMember ] = useState < any [ ] > ( [ ] ) ;
13
17
14
18
const onChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
15
19
setEamil ( event . target . value ) ;
@@ -34,8 +38,6 @@ const UserInvite: FC = () => {
34
38
/> ,
35
39
] ) ;
36
40
} ) ;
37
-
38
- console . log ( member ) ;
39
41
} ) ;
40
42
} ;
41
43
You can’t perform that action at this time.
0 commit comments