feat: refactor subscription handling in registration form and header component

This commit is contained in:
Ardeman
2025-03-02 12:21:18 +08:00
parent 4aa6c8d0d4
commit 9980cb90df
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ export const FormRegister = () => {
const [disabled, setDisabled] = useState(false)
const fetcher = useFetcher()
const loaderData = useRouteLoaderData<typeof loader>('routes/_layout')
const subscriptions = loaderData?.subscriptionsData
const formMethods = useRemixForm<TRegisterSchema>({
mode: 'onSubmit',
@@ -98,7 +99,7 @@ export const FormRegister = () => {
name="subscribe_plan"
label="Subscription"
placeholder="Pilih Subscription"
options={loaderData?.subscriptionsData}
options={subscriptions}
/>
{error && (