diff --git a/client/src/pages/CreateProj.tsx b/client/src/pages/CreateProj.tsx index 0b58cc2..51dab2b 100644 --- a/client/src/pages/CreateProj.tsx +++ b/client/src/pages/CreateProj.tsx @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import React, { useState } from 'react'; +import React, { PropsWithChildren, useState } from 'react'; import { toast } from 'react-hot-toast'; import { Form, useNavigate } from 'react-router-dom'; import { useUser } from '@clerk/clerk-react'; @@ -171,13 +171,14 @@ export function InputsView({ form, onChange, isFormValid, - loading -}: { + loading, + children +}: PropsWithChildren<{ form: FormState; onChange: FormChangeHandler; isFormValid: () => boolean; loading: boolean; -}) { +}>) { const onRadioChange = ({ target }: React.ChangeEvent) => { if (target.checked) { onChange(target.name as keyof FormState, target.value); @@ -283,7 +284,9 @@ export function InputsView({ /> - + + {children} + ); } @@ -366,19 +369,21 @@ function SubmitBtnView({ isFormValid, desktop, loading, -}: { + children +}: PropsWithChildren<{ isFormValid: () => boolean; desktop: boolean; loading: boolean; -}) { +}>) { return ( + {children} + - {/* Submit button for mobile view */} - ); }