import { Button } from '@material-ui/core'; import Input from 'component/common/Input/Input'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { useStyles } from 'component/segments/SegmentFormStepOne/SegmentFormStepOne.styles'; import { SegmentFormStep } from '../SegmentForm/SegmentForm'; interface ISegmentFormPartOneProps { name: string; description: string; setName: React.Dispatch>; setDescription: React.Dispatch>; errors: { [key: string]: string }; clearErrors: () => void; setCurrentStep: React.Dispatch>; } export const SegmentFormStepOne: React.FC = ({ children, name, description, setName, setDescription, errors, clearErrors, setCurrentStep, }) => { const history = useHistory(); const styles = useStyles(); return (

What is the segment name?

setName(e.target.value)} error={Boolean(errors.name)} errorText={errors.name} onFocus={() => clearErrors()} autoFocus required />

What is the segment description?

setDescription(e.target.value)} error={Boolean(errors.description)} errorText={errors.description} onFocus={() => clearErrors()} />
); };