fix: Failing tests (#13091)

* Stripe needs month starting from 1 and not 0

* Fix Routing form failure

* Fix failing test
This commit is contained in:
Hariom Balhara authored and GitHub committed 2024-01-08 14:23:41 +00:00
1 parent 15b0e0c5bd
commit e2ef9dd710
3 files changed
+17 -8

No files matched your search

@@ -553,11 +553,18 @@ export default function RouteBuilder({
<SingleForm
form={form}
appUrl={appUrl}
Page={({ hookForm, form }) => (
<div className="route-config">
<Routes hookForm={hookForm} appUrl={appUrl} form={form} />
</div>
)}
Page={({ hookForm, form }) => {
// If hookForm hasn't been initialized, don't render anything
// This is important here because some states get initialized which aren't reset when the hookForm is reset with the form values and they don't get the updated values
if (!hookForm.getValues().id) {
return null;
}
return (
<div className="route-config">
<Routes hookForm={hookForm} appUrl={appUrl} form={form} />
</div>
);
}}
/>
);
}