Skip to content

Commit

Permalink
refactor: update prop names
Browse files Browse the repository at this point in the history
  • Loading branch information
alaca committed Sep 16, 2024
1 parent ec4dafb commit 5bc4283
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {joiResolver} from '@hookform/resolvers/joi';
import {getValidationSchema} from '../../../../utils';

type FormInputs = {
campaignTitle: string;
title: string;
longDescription: string;
campaignImage: string;
campaignGoalType: string;
campaignGoal: number;
image: string;
goalType: string;
goal: number;
};

type PropTypes = {
Expand All @@ -21,11 +21,11 @@ type PropTypes = {
export default ({defaultValues}: PropTypes) => {

const validationSchema = getValidationSchema({
campaignTitle: Joi.string().required(),
title: Joi.string().required(),
longDescription: Joi.string(),
campaignImage: Joi.string(),
campaignGoalType: Joi.string().required(),
campaignGoal: Joi.number().required(),
image: Joi.string(),
goalType: Joi.string().required(),
goal: Joi.number().required(),
});

const {handleSubmit, control} = useForm<FormInputs>({
Expand All @@ -41,7 +41,7 @@ export default ({defaultValues}: PropTypes) => {
return (
<form onSubmit={handleSubmit(onSubmit)}>
<div>

Campaign settings
</div>
</form>
)
Expand Down

0 comments on commit 5bc4283

Please sign in to comment.