fix: handle non-array translation data before mapping buttons

This commit is contained in:
mouazkh
2026-01-13 20:42:48 +03:00
parent 062a4257e4
commit 301232fef1
4 changed files with 432 additions and 98 deletions

View File

@ -324,7 +324,10 @@ export default function DepartmentDetail6() {
}, []);
// buttons from translations (array)
const buttons = t("departmentDetail6.buttons", { returnObjects: true });
const buttons = [
{ id: 1, title: t("departmentDetail6.buttons.1"), key: "expertise" },
{ id: 3, title: t("departmentDetail6.buttons.3"), key: "works" },
];
// card groups from translations
const cardGroups = t("departmentDetail6.cardGroups", { returnObjects: true });