From 44d94e9f3f57895bea2c48e36eca497bfbf49778 Mon Sep 17 00:00:00 2001
From: Ida Marie Andreassen <43541032+idamand@users.noreply.github.com>
Date: Wed, 4 Dec 2024 15:31:14 +0100
Subject: [PATCH 1/4] v3 - Add translation to roles for employees (#947)
---
.../customerCaseEmployeeCard/CustomerCaseEmployeeCard.tsx | 5 ++++-
src/components/employeeCard/EmployeeCard.tsx | 4 +++-
src/components/employeePage/EmployeePage.tsx | 4 +++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/components/customerCaseEmployeeCard/CustomerCaseEmployeeCard.tsx b/src/components/customerCaseEmployeeCard/CustomerCaseEmployeeCard.tsx
index bab24148b..7ea34672d 100644
--- a/src/components/customerCaseEmployeeCard/CustomerCaseEmployeeCard.tsx
+++ b/src/components/customerCaseEmployeeCard/CustomerCaseEmployeeCard.tsx
@@ -1,4 +1,5 @@
import Image from "next/image";
+import { useTranslations } from "next-intl";
import Text from "src/components/text/Text";
import formatPhoneNumber from "src/components/utils/formatPhoneNumber";
@@ -15,6 +16,8 @@ export interface CustomerCaseEmployeeCardProps {
export default function CustomerCaseEmployeeCard({
employee,
}: CustomerCaseEmployeeCardProps) {
+ const t = useTranslations("employee_card");
+
return (
employee.imageThumbUrl &&
employee.name &&
@@ -38,7 +41,7 @@ export default function CustomerCaseEmployeeCard({
type="labelRegular"
key={competence}
>
- {competence}
+ {t(competence)}
))}
diff --git a/src/components/employeeCard/EmployeeCard.tsx b/src/components/employeeCard/EmployeeCard.tsx
index b9999e7aa..f380657a9 100644
--- a/src/components/employeeCard/EmployeeCard.tsx
+++ b/src/components/employeeCard/EmployeeCard.tsx
@@ -1,5 +1,6 @@
import Image from "next/image";
import Link from "next/link";
+import { useTranslations } from "next-intl";
import Text from "src/components/text/Text";
import formatPhoneNumber from "src/components/utils/formatPhoneNumber";
@@ -19,6 +20,7 @@ export default function EmployeeCard({
employeePageSlug,
language,
}: EmployeeCardProps) {
+ const t = useTranslations("employee_card");
return (
employee.imageUrl &&
employee.name &&
@@ -56,7 +58,7 @@ export default function EmployeeCard({
key={competence}
as="span"
>
- {competence}
+ {t(competence)}
))}
diff --git a/src/components/employeePage/EmployeePage.tsx b/src/components/employeePage/EmployeePage.tsx
index 6e94cdde4..b85793e4a 100644
--- a/src/components/employeePage/EmployeePage.tsx
+++ b/src/components/employeePage/EmployeePage.tsx
@@ -1,4 +1,5 @@
import Image from "next/image";
+import { useTranslations } from "next-intl";
import Text from "src/components/text/Text";
import formatPhoneNumber from "src/components/utils/formatPhoneNumber";
@@ -12,6 +13,7 @@ export interface EmployeePageProps {
export default function EmployeePage({ employee }: EmployeePageProps) {
const image = employee.imageUrl ?? employee.imageThumbUrl ?? null;
+ const t = useTranslations("employee_card");
return (
employee.name && (
@@ -47,7 +49,7 @@ export default function EmployeePage({ employee }: EmployeePageProps) {
)}
{employee.competences.map((competence) => (
- {competence}
+ {t(competence)}
))}
From 18f2e3e9543c4f71d9ced3aad8deb85cee8a24b1 Mon Sep 17 00:00:00 2001
From: Ida Marie Andreassen <43541032+idamand@users.noreply.github.com>
Date: Thu, 5 Dec 2024 09:30:13 +0100
Subject: [PATCH 2/4] V3 update header (#944)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Add new header design with transistions
* New header design works on desktop
* Add mobile and tablet version of header
* Working mobile and tablet version ✨
* Add aria-label to menu button
* Fix: Remove breadcrumbs from PageHeader
* Remove todos
* Fix colors
---
public/_assets/dot.svg | 5 +
public/_assets/green-dot.svg | 5 +
public/_assets/menu-close.svg | 8 +-
public/_assets/menu.svg | 9 +-
src/app/(main)/[locale]/[...path]/page.tsx | 9 +-
src/app/(main)/[locale]/page.tsx | 2 -
.../languageSwitcher/LanguageSwitcher.tsx | 15 ++-
.../languageSwitcher.module.css | 40 ++++++-
src/components/link/CustomLink.tsx | 98 +++++++++-------
src/components/link/link.module.css | 50 +++++---
src/components/navigation/header/Header.tsx | 111 +++++++++---------
.../navigation/header/HeaderPreview.tsx | 6 -
.../navigation/header/PageHeader.tsx | 8 --
.../navigation/header/header.module.css | 102 +++++++++++-----
src/styles/global.css | 1 +
src/utils/hooks/useScrollDirection.ts | 27 +++++
16 files changed, 316 insertions(+), 180 deletions(-)
create mode 100644 public/_assets/dot.svg
create mode 100644 public/_assets/green-dot.svg
create mode 100644 src/utils/hooks/useScrollDirection.ts
diff --git a/public/_assets/dot.svg b/public/_assets/dot.svg
new file mode 100644
index 000000000..7db8e7676
--- /dev/null
+++ b/public/_assets/dot.svg
@@ -0,0 +1,5 @@
+
diff --git a/public/_assets/green-dot.svg b/public/_assets/green-dot.svg
new file mode 100644
index 000000000..aff7b014b
--- /dev/null
+++ b/public/_assets/green-dot.svg
@@ -0,0 +1,5 @@
+
diff --git a/public/_assets/menu-close.svg b/public/_assets/menu-close.svg
index a96e8cd5c..55927f7f4 100644
--- a/public/_assets/menu-close.svg
+++ b/public/_assets/menu-close.svg
@@ -1,6 +1,6 @@
-