feat: restructure ads mgmt by creating a new layout for ads creation and updating related schemas

This commit is contained in:
Ardeman
2025-03-12 09:47:21 +08:00
parent 90e2042a91
commit 70cbb134d8
22 changed files with 382 additions and 71 deletions
@@ -5,10 +5,7 @@ import { XiorError } from 'xior'
import { updateCategoryRequest } from '~/apis/admin/update-category'
import { handleCookie } from '~/libs/cookies'
import {
createCategorySchema,
type TCategorySchema,
} from '~/pages/form-category'
import { categorySchema, type TCategorySchema } from '~/pages/form-category'
import type { Route } from './+types/actions.register'
@@ -21,7 +18,7 @@ export const action = async ({ request }: Route.ActionArgs) => {
receivedValues: defaultValues,
} = await getValidatedFormData<TCategorySchema>(
request,
zodResolver(createCategorySchema),
zodResolver(categorySchema),
false,
)