refactor: rename subscription references to subscribe plan and update related imports

This commit is contained in:
Ardeman
2025-03-13 06:13:43 +08:00
parent cd76ded632
commit f40f2dadde
13 changed files with 66 additions and 62 deletions
+5 -5
View File
@@ -26,7 +26,7 @@ export const registerSchema = z
.optional()
.nullable()
.refine((data) => !!data, {
message: 'Please select a subscription',
message: 'Please select a Subscribe Plan',
}),
})
.refine((field) => field.password === field.rePassword, {
@@ -42,7 +42,7 @@ export const FormRegister = () => {
const [error, setError] = useState<string>()
const fetcher = useFetcher()
const loaderData = useRouteLoaderData<typeof loader>('routes/_news')
const { subscriptionsData: subscriptions } = loaderData || {}
const { subscribePlanData: subscribePlan } = loaderData || {}
const formMethods = useRemixForm<TRegisterSchema>({
mode: 'onSubmit',
@@ -107,9 +107,9 @@ export const FormRegister = () => {
<Combobox
id="subscribe_plan"
name="subscribe_plan"
label="Subscription"
placeholder="Pilih Subscription"
options={subscriptions}
label="Subscribe Plan"
placeholder="Pilih Subscribe Plan"
options={subscribePlan}
/>
{error && (