File tree Expand file tree Collapse file tree
apps/web/src/routes/_app/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,16 +42,18 @@ const RouteComponent = () => {
4242 </ Heading >
4343 </ PageHeader >
4444 < div className = "space-y-4" >
45- < StartSessionForm
46- currentGroup = { currentGroup }
47- initialValues = { initialValues }
48- readOnly = { currentSession !== null || createSessionMutation . isPending }
49- username = { currentUser ?. username }
50- onSubmit = { async ( formData ) => {
51- const session = await createSessionMutation . mutateAsync ( formData ) ;
52- startSession ( { ...session , type : formData . type } ) ;
53- } }
54- />
45+ { currentSession == null && (
46+ < StartSessionForm
47+ currentGroup = { currentGroup }
48+ initialValues = { initialValues }
49+ readOnly = { currentSession !== null || createSessionMutation . isPending }
50+ username = { currentUser ?. username }
51+ onSubmit = { async ( formData ) => {
52+ const session = await createSessionMutation . mutateAsync ( formData ) ;
53+ startSession ( { ...session , type : formData . type } ) ;
54+ } }
55+ />
56+ ) }
5557 { currentSession !== null && (
5658 < div className = "mx-auto block max-h-fit max-w-3xl rounded-lg border border-gray-200 bg-white p-6 opacity-70 shadow-sm dark:border-gray-700 dark:bg-gray-800" >
5759 < p className = "max-w-4xl text-center text-yellow-600 dark:text-yellow-300" >
You can’t perform that action at this time.
0 commit comments