refactor: reuse query code for both loyalty and account pages

This commit is contained in:
Matilda Landström
2024-05-27 16:13:44 +02:00
parent 0b694f6a74
commit fb4fbb1cbd
9 changed files with 150 additions and 271 deletions

View File

@@ -0,0 +1,12 @@
import { z } from "zod"
export enum PageTypes {
Account,
Loyalty,
}
export const PageTypeEnum = z
.object({
pageType: z.nativeEnum(PageTypes),
})
.default({ pageType: PageTypes.Account })