Skip to content

Commit

Permalink
fix: update form submission value
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspang committed Aug 2, 2023
1 parent 77a24e7 commit 7d2b66e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pages/project/create/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,10 @@ export default function ProjectForm() {
mutateAsync,
isLoading: isSubmitLoading,
isSuccess: isSubmitSuccess,
} = useMutation(["submit-project"], () =>
createProject(idToken, form.getValues())
} = useMutation(["submit-project"], () => {
const values = form.getValues();
return createProject(idToken, { ...values, video_image: retrieveYoutubeId(values.video_image) })
}
);
const { data: checkoutLink, isLoading: isCheckoutLinkLoading } = useQuery(
["checkout-link", fee, createProjectData?._id, admin_address],
Expand Down

0 comments on commit 7d2b66e

Please sign in to comment.