diff --git a/components/Footer/index.tsx b/components/Footer/index.tsx
index 129ab1cd5..b571d13fb 100644
--- a/components/Footer/index.tsx
+++ b/components/Footer/index.tsx
@@ -10,12 +10,16 @@ export default async function Footer() {
lang: getLang(),
})
if (!footerData) {
- return null
+ return
}
return (
)
}
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json
index 2713a42c8..75dee4409 100644
--- a/i18n/dictionaries/da.json
+++ b/i18n/dictionaries/da.json
@@ -42,6 +42,7 @@
"Compare all levels": "Sammenlign alle niveauer",
"Contact us": "Kontakt os",
"Continue": "Blive ved",
+ "Copyright all rights reserved": "Scandic AB Alle rettigheder forbeholdes",
"Could not find requested resource": "Kunne ikke finde den anmodede ressource",
"Country": "Land",
"Country code": "Landekode",
diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json
index 12d595791..8d9bb8b55 100644
--- a/i18n/dictionaries/de.json
+++ b/i18n/dictionaries/de.json
@@ -41,6 +41,7 @@
"Compare all levels": "Vergleichen Sie alle Levels",
"Contact us": "Kontaktieren Sie uns",
"Continue": "Weitermachen",
+ "Copyright all rights reserved": "Scandic AB Alle Rechte vorbehalten",
"Could not find requested resource": "Die angeforderte Ressource konnte nicht gefunden werden.",
"Country": "Land",
"Country code": "Landesvorwahl",
diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json
index 4cd5cfe93..005de13b0 100644
--- a/i18n/dictionaries/en.json
+++ b/i18n/dictionaries/en.json
@@ -42,6 +42,7 @@
"Compare all levels": "Compare all levels",
"Contact us": "Contact us",
"Continue": "Continue",
+ "Copyright all rights reserved": "Scandic AB All rights reserved",
"Could not find requested resource": "Could not find requested resource",
"Country": "Country",
"Country code": "Country code",
diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json
index 1ca7e2bd7..cd4018c30 100644
--- a/i18n/dictionaries/fi.json
+++ b/i18n/dictionaries/fi.json
@@ -42,6 +42,7 @@
"Compare all levels": "Vertaa kaikkia tasoja",
"Contact us": "Ota meihin yhteyttä",
"Continue": "Jatkaa",
+ "Copyright all rights reserved": "Scandic AB Kaikki oikeudet pidätetään",
"Could not find requested resource": "Pyydettyä resurssia ei löytynyt",
"Country": "Maa",
"Country code": "Maatunnus",
diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json
index cfffcf867..ed3004bd4 100644
--- a/i18n/dictionaries/no.json
+++ b/i18n/dictionaries/no.json
@@ -42,6 +42,7 @@
"Compare all levels": "Sammenlign alle nivåer",
"Contact us": "Kontakt oss",
"Continue": "Fortsette",
+ "Copyright all rights reserved": "Scandic AB Alle rettigheter forbeholdt",
"Could not find requested resource": "Kunne ikke finne den forespurte ressursen",
"Country": "Land",
"Country code": "Landskode",
diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json
index 4b267b143..1f231c836 100644
--- a/i18n/dictionaries/sv.json
+++ b/i18n/dictionaries/sv.json
@@ -42,6 +42,7 @@
"Compare all levels": "Jämför alla nivåer",
"Contact us": "Kontakta oss",
"Continue": "Fortsätt",
+ "Copyright all rights reserved": "Scandic AB Alla rättigheter förbehålls",
"Could not find requested resource": "Det gick inte att hitta den begärda resursen",
"Country": "Land",
"Country code": "Landskod",
diff --git a/lib/graphql/Fragments/Footer/SocialMedia.graphql b/lib/graphql/Fragments/Footer/SocialMedia.graphql
new file mode 100644
index 000000000..02947ae5d
--- /dev/null
+++ b/lib/graphql/Fragments/Footer/SocialMedia.graphql
@@ -0,0 +1,11 @@
+fragment SocialMedia on Footer {
+ social_media {
+ links {
+ href {
+ href
+ title
+ }
+ type
+ }
+ }
+}
diff --git a/lib/graphql/Query/Footer.graphql b/lib/graphql/Query/Footer.graphql
index 1a05f8188..211f0ef20 100644
--- a/lib/graphql/Query/Footer.graphql
+++ b/lib/graphql/Query/Footer.graphql
@@ -1,6 +1,7 @@
#import "../Fragments/Footer/AppDownloads.graphql"
#import "../Fragments/Footer/MainLinks.graphql"
#import "../Fragments/Footer/SecondaryLinks.graphql"
+#import "../Fragments/Footer/SocialMedia.graphql"
#import "../Fragments/Footer/Refs/MainLinks.graphql"
#import "../Fragments/Footer/Refs/SecondaryLinks.graphql"
#import "../Fragments/Refs/System.graphql"
@@ -11,6 +12,7 @@ query GetFooter($locale: String!) {
...MainLinks
...SecondaryLinks
...AppDownloads
+ ...SocialMedia
}
}
}
diff --git a/server/routers/contentstack/base/output.ts b/server/routers/contentstack/base/output.ts
index d98346668..43521c2af 100644
--- a/server/routers/contentstack/base/output.ts
+++ b/server/routers/contentstack/base/output.ts
@@ -319,6 +319,14 @@ export const validateFooterConfigSchema = z.object({
links: z.array(validateLinkItem),
})
),
+ social_media: z.object({
+ links: z.array(
+ z.object({
+ type: z.string(),
+ href: validateExternalLink,
+ })
+ ),
+ }),
})
),
}),
diff --git a/server/routers/contentstack/base/query.ts b/server/routers/contentstack/base/query.ts
index 077052ca8..8baa52535 100644
--- a/server/routers/contentstack/base/query.ts
+++ b/server/routers/contentstack/base/query.ts
@@ -599,6 +599,7 @@ export const baseQueryRouter = router({
mainLinks: mainLinks,
appDownloads: validatedFooterData.app_downloads,
secondaryLinks: secondaryLinks,
+ socialMedia: validatedFooterData.social_media,
}
}),
})
diff --git a/server/routers/contentstack/base/utils.ts b/server/routers/contentstack/base/utils.ts
index c70c54781..bb73a6f10 100644
--- a/server/routers/contentstack/base/utils.ts
+++ b/server/routers/contentstack/base/utils.ts
@@ -49,6 +49,7 @@ export function transformPageConnectionLinks(links: FooterLinkItem[]) {
title: edge.node.title || "",
url: edge.node.url || "",
openInNewTab: link.open_in_new_tab,
+ isExternal: false,
}))
} else if (link.link) {
return [
@@ -56,6 +57,7 @@ export function transformPageConnectionLinks(links: FooterLinkItem[]) {
title: link.link.title,
url: link.link.href,
openInNewTab: link.open_in_new_tab,
+ isExternal: true,
},
]
}
diff --git a/types/components/footer/appDownloadIcons.ts b/types/components/footer/appDownloadIcons.ts
new file mode 100644
index 000000000..5c05a4ccb
--- /dev/null
+++ b/types/components/footer/appDownloadIcons.ts
@@ -0,0 +1,14 @@
+export enum AppDownLoadLinks {
+ apple_da = "/_static/img/app-store-badge-da.svg",
+ apple_de = "/_static/img/app-store-badge-de.svg",
+ apple_en = "/_static/img/app-store-badge-en.svg",
+ apple_fi = "/_static/img/app-store-badge-fi.svg",
+ apple_no = "/_static/img/app-store-badge-no.svg",
+ apple_sv = "/_static/img/app-store-badge-sv.svg",
+ google_da = "/_static/img/google-play-badge-da.svg",
+ google_de = "/_static/img/google-play-badge-de.svg",
+ google_en = "/_static/img/google-play-badge-en.svg",
+ google_fi = "/_static/img/google-play-badge-fi.svg",
+ google_no = "/_static/img/google-play-badge-no.svg",
+ google_sv = "/_static/img/google-play-badge-sv.svg",
+}
diff --git a/types/components/footer/navigation.ts b/types/components/footer/navigation.ts
index f83663f59..bda1362d5 100644
--- a/types/components/footer/navigation.ts
+++ b/types/components/footer/navigation.ts
@@ -9,40 +9,41 @@ export type FooterMainNavProps = {
}
export type FooterSecondaryNav = {
- id: string
isExternal: boolean
openInNewTab: boolean
title: string
url: string
}
-export type FooterSecondaryNavProps = {
- secondaryLinks: {
- title: string
- links: FooterSecondaryNav[]
- }[]
- appDownloads: {
- title: string
- links: {
- href: {
+type FooterSecondaryNavGroup = {
+ title: string
+ links: FooterSecondaryNav[]
+}
+type FooterLinkWithType = {
+ href?:
+ | {
href: string
title: string
}
- type: string
- }[]
- }
+ | undefined
+ type: string
}
-export enum AppDownLoadLinks {
- apple_da = "/_static/img/app-store-badge-da.svg",
- apple_de = "/_static/img/app-store-badge-de.svg",
- apple_en = "/_static/img/app-store-badge-en.svg",
- apple_fi = "/_static/img/app-store-badge-fi.svg",
- apple_no = "/_static/img/app-store-badge-no.svg",
- apple_sv = "/_static/img/app-store-badge-sv.svg",
- google_da = "/_static/img/google-play-badge-da.svg",
- google_de = "/_static/img/google-play-badge-de.svg",
- google_en = "/_static/img/google-play-badge-en.svg",
- google_fi = "/_static/img/google-play-badge-fi.svg",
- google_no = "/_static/img/google-play-badge-no.svg",
- google_sv = "/_static/img/google-play-badge-sv.svg",
+type FooterAppDownloads = {
+ title: string
+ links: FooterLinkWithType[]
}
+
+type FooterSocialMedia = {
+ links: FooterLinkWithType[]
+}
+
+export type FooterSecondaryNavProps = {
+ secondaryLinks: FooterSecondaryNavGroup[]
+ appDownloads: FooterAppDownloads
+}
+
+export type FooterDetailsProps = {
+ socialMedia?: FooterSocialMedia
+}
+
+export type FooterNavigationProps = FooterMainNavProps & FooterSecondaryNavProps