Merged in feat/use-translations-overview-table (pull request #342)

fix: use translations for overview table

Approved-by: Christel Westerberg
This commit is contained in:
Matilda Landström
2024-07-12 07:04:20 +00:00
parent 801a041404
commit 4b4076675a
5 changed files with 19 additions and 12 deletions

View File

@@ -6,8 +6,9 @@ import CardsGrid from "./CardsGrid"
import type { BlocksProps } from "@/types/components/loyalty/blocks"
import { LoyaltyBlocksTypenameEnum } from "@/types/components/loyalty/enums"
import { LangParams } from "@/types/params"
export function Blocks({ blocks }: BlocksProps) {
export function Blocks({ blocks, lang }: BlocksProps & LangParams) {
return blocks.map((block, idx) => {
const firstItem = idx === 0
switch (block.__typename) {
@@ -26,6 +27,7 @@ export function Blocks({ blocks }: BlocksProps) {
dynamicContent={block.dynamic_content}
firstItem={firstItem}
key={`${block.dynamic_content.title}-${idx}`}
lang={lang}
/>
)
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksShortcuts: