fix: add cta text on card grid block
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
import Title from "@/components/Title"
|
||||
|
||||
import Button from "../Button"
|
||||
|
||||
@@ -67,6 +67,7 @@ query GetLoyaltyPage($locale: String!, $url: String!) {
|
||||
title
|
||||
subtitle
|
||||
open_in_new_tab
|
||||
cta_text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ const loyaltyPageBlockCardGrid = z.object({
|
||||
totalCount: z.number(),
|
||||
}),
|
||||
open_in_new_tab: z.boolean(),
|
||||
cta_text: z.string().optional(),
|
||||
})
|
||||
),
|
||||
}),
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user