refactor: useContext & remove enum

This commit is contained in:
mikezzb
2023-12-03 01:15:59 -05:00
parent eccf63dcfd
commit 40a4ec4436
6 changed files with 66 additions and 65 deletions

View File

@@ -10,7 +10,7 @@ import { Input } from '@documenso/ui/primitives/input';
import { Label } from '@documenso/ui/primitives/label';
import { Textarea } from '@documenso/ui/primitives/textarea';
import type { WithStep } from '../stepper';
import { useStep } from '../stepper';
import type { TAddSubjectFormSchema } from './add-subject.types';
import {
DocumentFlowFormContainerActions,
@@ -34,8 +34,7 @@ export const AddSubjectFormPartial = ({
fields: _fields,
document,
onSubmit,
useStep,
}: WithStep<AddSubjectFormProps>) => {
}: AddSubjectFormProps) => {
const {
register,
handleSubmit,
@@ -50,7 +49,7 @@ export const AddSubjectFormPartial = ({
});
const onFormSubmit = handleSubmit(onSubmit);
const { currentStep, totalSteps, nextStep, previousStep } = useStep();
const { currentStep, totalSteps, previousStep } = useStep();
return (
<>