Skip to content

Commit

Permalink
feat: Updated packages/hub/src/relative-values/com
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Oct 27, 2023
1 parent a0dbd2b commit 9e503b8
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ export const RelativeValuesDefinitionForm: FC<Props> = ({
}) => {
const form = useForm<FormShape>({ defaultValues });

const onSubmit = form.handleSubmit(async (data) => {
const onSubmit = form.handleSubmit((data) => {
// Save operation
try {
await save(data);
await updateRelativeValuesDefinition(data);
} catch (error) {
// Handle error
displayError("Failed to save data: " + error.message);
}
save(data)
.then(() => updateRelativeValuesDefinition(data))
.catch((error) => {
// Handle error
toast.error("Failed to save data: " + error.message);
});
});

return (
Expand Down

0 comments on commit 9e503b8

Please sign in to comment.