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

@@ -33,6 +33,7 @@ import {
OverviewTableProps,
OverviewTableReducerAction,
} from "@/types/components/loyalty/blocks"
import { LangParams } from "@/types/params"
import type { User } from "@/types/user"
const levelsTranslations = {
@@ -126,9 +127,9 @@ function reducer(state: any, action: OverviewTableReducerAction) {
export default function OverviewTable({
activeMembership,
}: OverviewTableProps) {
lang,
}: OverviewTableProps & LangParams) {
const intl = useIntl()
const lang = Lang.en
const levelsData = levelsTranslations[lang]
const [selectionState, dispatch] = useReducer(
reducer,