Skip to content

Commit

Permalink
chore: fix error and form states
Browse files Browse the repository at this point in the history
  • Loading branch information
yvesfracari committed Oct 17, 2024
1 parent 0527b4d commit 44eb952
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/deposit-pool/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Page() {

const { setValue, control } = useFormContext<FormType>();

const { isSubmitting, isSubmitSuccessful } = useFormState({
const { isSubmitting } = useFormState({
control,
});

Expand Down Expand Up @@ -79,7 +79,7 @@ export default function Page() {
<Button
type="submit"
className="my-2 rounded-xl text-lg min-h-[58px]"
loading={isSubmitting || isSubmitSuccessful}
loading={isSubmitting}
disabled={!referenceAmount || referenceAmount <= 0}
loadingText="Creating hook..."
>
Expand Down
2 changes: 1 addition & 1 deletion apps/deposit-pool/src/contexts/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function FormContextProvider({ children }: PropsWithChildren) {
const hookInfo = await getHookInfo(data);
if (!hookInfo) return;
setHookInfo(hookInfo);
router.push("/signing");
await router.push("/signing");
},
[context?.account, getHookInfo, setHookInfo, router]
);
Expand Down

0 comments on commit 44eb952

Please sign in to comment.