diff --git a/components/TempDesignSystem/Card/index.tsx b/components/TempDesignSystem/Card/index.tsx index afb352530..b272b8152 100644 --- a/components/TempDesignSystem/Card/index.tsx +++ b/components/TempDesignSystem/Card/index.tsx @@ -1,5 +1,3 @@ -import { _ } from "@/lib/translation" - import Title from "@/components/Title" import Button from "../Button" diff --git a/lib/graphql/Query/LoyaltyPage.graphql b/lib/graphql/Query/LoyaltyPage.graphql index e4d0a4332..c1bb19cc7 100644 --- a/lib/graphql/Query/LoyaltyPage.graphql +++ b/lib/graphql/Query/LoyaltyPage.graphql @@ -67,6 +67,7 @@ query GetLoyaltyPage($locale: String!, $url: String!) { title subtitle open_in_new_tab + cta_text } } } diff --git a/server/routers/contentstack/loyaltyPage/output.ts b/server/routers/contentstack/loyaltyPage/output.ts index 3fa587d93..0d546a500 100644 --- a/server/routers/contentstack/loyaltyPage/output.ts +++ b/server/routers/contentstack/loyaltyPage/output.ts @@ -37,6 +37,7 @@ const loyaltyPageBlockCardGrid = z.object({ totalCount: z.number(), }), open_in_new_tab: z.boolean(), + cta_text: z.string().optional(), }) ), }), diff --git a/server/routers/contentstack/loyaltyPage/query.ts b/server/routers/contentstack/loyaltyPage/query.ts index 321b9ade2..4c4ce9e5c 100644 --- a/server/routers/contentstack/loyaltyPage/query.ts +++ b/server/routers/contentstack/loyaltyPage/query.ts @@ -1,5 +1,6 @@ import GetLoyaltyPage from "@/lib/graphql/Query/LoyaltyPage.graphql" import { request } from "@/lib/graphql/request" +import { _ } from "@/lib/translation" import { badRequestError } from "@/server/errors/trpc" import { publicProcedure, router } from "@/server/trpc" @@ -77,8 +78,7 @@ export const loyaltyPageQueryRouter = router({ link: card.referenceConnection.totalCount ? { href: card.referenceConnection.edges[0].node.url, - title: - card.referenceConnection.edges[0].node.title, + title: card.cta_text || _("Read more"), } : undefined, }