File tree Expand file tree Collapse file tree 1 file changed +26
-10
lines changed
openbas-front/src/admin/components/components/teams Expand file tree Collapse file tree 1 file changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { makeStyles } from 'tss-react/mui';
66import { type TeamInputForm } from '../../../../actions/teams/Team' ;
77import { addTeam } from '../../../../actions/teams/team-actions' ;
88import Dialog from '../../../../components/common/dialog/Dialog' ;
9+ import Drawer from '../../../../components/common/Drawer' ;
910import { useFormatter } from '../../../../components/i18n' ;
1011import { type Team , type TeamCreateInput } from '../../../../utils/api-types' ;
1112import { useAppDispatch } from '../../../../utils/hooks' ;
@@ -86,17 +87,32 @@ const CreateTeam: FunctionComponent<CreateTeamProps> = ({
8687 < Add />
8788 </ Fab >
8889 ) }
89- < Dialog
90- open = { openDialog }
91- handleClose = { handleClose }
92- title = { t ( 'Create a new team' ) }
93- >
94- < TeamForm
95- initialValues = { { team_tags : [ ] } }
90+ { inline ? (
91+ < Dialog
92+ open = { openDialog }
93+ handleClose = { handleClose }
94+ title = { t ( 'Create a new team' ) }
95+ >
96+ < TeamForm
97+ initialValues = { { team_tags : [ ] } }
98+ handleClose = { handleClose }
99+ onSubmit = { onSubmit }
100+ />
101+ </ Dialog >
102+ ) : (
103+ < Drawer
104+ open = { openDialog }
96105 handleClose = { handleClose }
97- onSubmit = { onSubmit }
98- />
99- </ Dialog >
106+ title = { t ( 'Create a new team' ) }
107+ >
108+ < TeamForm
109+ initialValues = { { team_tags : [ ] } }
110+ handleClose = { handleClose }
111+ onSubmit = { onSubmit }
112+ />
113+ </ Drawer >
114+ ) }
115+
100116 </ div >
101117 ) ;
102118} ;
You can’t perform that action at this time.
0 commit comments