fix: teams can now be created

This commit is contained in:
Jordan Knott
2021-11-01 20:58:42 -05:00
parent cea99397db
commit 3afd860534
2 changed files with 18 additions and 2 deletions

View File

@ -23,6 +23,7 @@ import NOOP from 'shared/utils/noop';
import theme from 'App/ThemeStyles';
import polling from 'shared/utils/polling';
import { mixin } from '../shared/utils/styles';
import FormInput from 'shared/components/FormInput';
type CreateTeamData = { name: string };
@ -52,7 +53,7 @@ const CreateTeamForm: React.FC<CreateTeamFormProps> = ({ onCreateTeam }) => {
return (
<CreateTeamFormContainer onSubmit={handleSubmit(createTeam)}>
{errors.name && <ErrorText>{errors.name.message}</ErrorText>}
<ControlledInput width="100%" label="Team name" variant="alternate" {...register('name')} />
<FormInput width="100%" label="Team name" variant="alternate" {...register('name')} />
<CreateTeamButton type="submit">Create</CreateTeamButton>
</CreateTeamFormContainer>
);