feat: add card grid component
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { GetMyPagesBreadcrumbs } from "@/lib/graphql/Query/BreadcrumbsMyPages.graphql"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { badRequestError, internalServerError } from "@/server/errors/trpc"
|
||||
import { validateBreadcrumbsConstenstackSchema } from "./output"
|
||||
import { publicProcedure, router } from "@/server/trpc"
|
||||
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { GetMyPagesBreadcrumbs } from "@/lib/graphql/Query/BreadcrumbsMyPages.graphql"
|
||||
import { getBreadcrumbsInput } from "./input"
|
||||
import { validateBreadcrumbsConstenstackSchema } from "./output"
|
||||
|
||||
import { GetMyPagesBreadcrumbsData } from "@/types/requests/myPages/breadcrumbs"
|
||||
|
||||
export const breadcrumbsQueryRouter = router({
|
||||
|
||||
10
server/routers/contentstack/loyaltyPage/input.ts
Normal file
10
server/routers/contentstack/loyaltyPage/input.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
const langs = Object.keys(Lang) as [keyof typeof Lang]
|
||||
|
||||
export const getLoyaltyPageInput = z.object({
|
||||
href: z.string().min(1, { message: "href is required" }),
|
||||
locale: z.enum(langs),
|
||||
})
|
||||
@@ -1,6 +1,7 @@
|
||||
import { allLevels } from "./temp"
|
||||
import { protectedProcedure, publicProcedure, router } from "@/server/trpc"
|
||||
|
||||
import { allLevels } from "./temp"
|
||||
|
||||
function fakingRequest<T>(payload: T): Promise<T> {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -9,6 +9,7 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 2,
|
||||
@@ -20,6 +21,7 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 3,
|
||||
@@ -31,6 +33,7 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 4,
|
||||
@@ -42,6 +45,7 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 5,
|
||||
@@ -53,6 +57,7 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 6,
|
||||
@@ -64,5 +69,18 @@ export const allLevels = [
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
{
|
||||
tier: 7,
|
||||
name: "New Friend",
|
||||
requiredPoints: 50000,
|
||||
requiredNights: "X",
|
||||
topBenefits: [
|
||||
"15% on food on weekends",
|
||||
"Always best price",
|
||||
"Book reward nights with points",
|
||||
],
|
||||
logo: "/_static/icons/new-friend.png",
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user