Merged in chore/partner-sas-404-page (pull request #3339)

chore: Fix partner-sas 404 page

* Fix 404 page

* Fix 404 links

* Fix links


Approved-by: Matilda Landström
This commit is contained in:
Anton Gunnarsson
2025-12-17 13:03:33 +00:00
parent 79f1c516c0
commit eb3b18b35e
6 changed files with 183 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
import NotFound from "@/components/NotFound"
export default function NotFoundPage() {
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
return <div>Not Found</div>
return <NotFound />
}

View File

@@ -1,4 +1,5 @@
import NotFound from "@/components/NotFound"
export default function NotFoundPage() {
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
return <div>Not Found, missing lang in url?</div>
return <NotFound />
}

View File

@@ -0,0 +1,61 @@
import type { Lang } from "@scandic-hotels/common/constants/language"
type Texts = {
title: string
goToStartPage: {
question: string
link: string
linkText: string
}
}
export const texts: Record<Lang, Texts> = {
en: {
title: "Sorry, page not found.",
goToStartPage: {
question: "Would you like to go back to the ",
link: "https://sas.scandichotels.com/en",
linkText: "startpage",
},
},
sv: {
title: "Oj då, vi kunde inte hitta sidan du söker.",
goToStartPage: {
question: "Vill du gå tillbaka till ",
link: "https://sas.scandichotels.com/sv",
linkText: "startsidan",
},
},
de: {
title: "Tut uns leid, Seite nicht gefunden.",
goToStartPage: {
question: "Möchten Sie zurück zur ",
link: "https://sas.scandichotels.com/de",
linkText: "Startseite",
},
},
fi: {
title: "Valitettavasti sivua ei löydy.",
goToStartPage: {
question: "Haluaisitko mennä takaisin ",
link: "https://sas.scandichotels.com/fi",
linkText: "etusivulle",
},
},
no: {
title: "Oi da, vi fant ikke siden du lette etter...",
goToStartPage: {
question: "Vil du gå tilbake til ",
link: "https://sas.scandichotels.com/no",
linkText: "startsiden",
},
},
da: {
title: "Hov - siden kan ikke findes!",
goToStartPage: {
question: "Vil du gå tilbage til ",
link: "https://sas.scandichotels.com/da",
linkText: "startsiden",
},
},
}

View File

@@ -0,0 +1,32 @@
import { getLang } from "@/i18n/serverContext"
import { texts } from "./Texts"
import styles from "./notFound.module.css"
export default async function NotFound() {
const lang = await getLang()
const infoTexts = texts[lang]
return (
<div className={styles.container}>
<div className={styles.content}>
<h1 className={styles.header}>{infoTexts.title}</h1>
<div className={styles.pitch}>
<p className={styles.text}>
{infoTexts.goToStartPage.question}
<a
className={styles.link}
title={infoTexts.goToStartPage.linkText}
href={infoTexts.goToStartPage.link}
>
{infoTexts.goToStartPage.linkText}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
</a>
?
</p>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,68 @@
.container {
margin-top: 0;
background: var(--Background-Primary);
position: relative;
background-clip: content-box;
}
.content {
position: relative;
text-align: center;
box-sizing: content-box;
max-width: var(--max-width-page);
margin: 0 auto;
padding: 70px 30px;
}
.header {
font-family:
brandon text,
Arial,
Helvetica,
sans-serif;
font-size: 32px;
line-height: 1;
margin: 0;
text-transform: uppercase;
font-weight: 400;
color: #483729;
}
.pitch {
margin-top: 32px;
margin-bottom: 16px;
}
.text {
font-family:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
font-weight: 300;
line-height: normal;
text-transform: none;
font-size: 20px;
color: #333;
}
.link {
color: #00838e;
text-decoration: none;
}
@media screen and (min-width: 740px) {
.content {
text-align: left;
}
}
@media screen and (min-width: 950px) {
.header {
font-size: 46px;
}
.text {
font-size: 24px;
}
}

View File

@@ -24,7 +24,7 @@ export const texts: Record<Lang, Texts> = {
title: "Sorry, page not found.",
goToStartPage: {
question: "Would you like to go back to the ",
link: "https://www.scandichotels.com/",
link: "https://www.scandichotels.com/en",
linkText: "startpage",
},
goToDestinations: {
@@ -42,17 +42,17 @@ export const texts: Record<Lang, Texts> = {
title: "Oj då, vi kunde inte hitta sidan du söker.",
goToStartPage: {
question: "Vill du gå tillbaka till ",
link: "https://www.scandichotels.se/",
link: "https://www.scandichotels.com/sv",
linkText: "startsidan",
},
goToDestinations: {
question: "Eller resa till våra ",
link: "https://www.scandichotels.se/hotell",
link: "https://www.scandichotels.com/sv/destinationer",
linkText: "destinationer",
},
goToOffers: {
question: " eller se våra senaste ",
link: "https://www.scandichotels.se/erbjudanden-och-weekendpaket",
link: "https://www.scandichotels.com/sv/erbjudanden",
linkText: "erbjudanden",
},
},
@@ -60,17 +60,17 @@ export const texts: Record<Lang, Texts> = {
title: "Tut uns leid, Seite nicht gefunden.",
goToStartPage: {
question: "Möchten Sie zurück zur ",
link: "https://www.scandichotels.de/",
link: "https://www.scandichotels.com/de/",
linkText: "Startseite",
},
goToDestinations: {
question: "Oder machen Sie einen Ausflug zu unseren ",
link: "https://www.scandichotels.de/hotelsuche",
link: "https://www.scandichotels.com/de/reiseziele",
linkText: "Reisezielen",
},
goToOffers: {
question: " und aktuellen ",
link: "https://www.scandichotels.de/angebote-arrangements",
link: "https://www.scandichotels.com/de/angebote",
linkText: "Angeboten",
},
},
@@ -78,17 +78,17 @@ export const texts: Record<Lang, Texts> = {
title: "Valitettavasti sivua ei löydy.",
goToStartPage: {
question: "Haluaisitko mennä takaisin ",
link: "https://www.scandichotels.fi/",
link: "https://www.scandichotels.com/fi/",
linkText: "etusivulle",
},
goToDestinations: {
question: "Voit myös tutustu ",
link: "https://www.scandichotels.fi/hotellit",
link: "https://www.scandichotels.com/fi/kohteet",
linkText: "kohteisiimme",
},
goToOffers: {
question: " tai ajankohtaisiin ",
link: "https://www.scandichotels.fi/tarjoukset",
link: "https://www.scandichotels.com/fi/tarjoukset",
linkText: "tarjouksiimme",
},
},
@@ -96,17 +96,17 @@ export const texts: Record<Lang, Texts> = {
title: "Oi da, vi fant ikke siden du lette etter...",
goToStartPage: {
question: "Vil du gå tilbake til ",
link: "https://www.scandichotels.no/",
link: "https://www.scandichotels.com/no/",
linkText: "startsiden",
},
goToDestinations: {
question: "Eller ta en tur til våre ",
link: "https://www.scandichotels.no/hotell",
link: "https://www.scandichotels.com/no/destinasjoner",
linkText: "destinasjoner",
},
goToOffers: {
question: " eller siste ",
link: "https://www.scandichotels.no/hotelltilbud",
link: "https://www.scandichotels.com/no/hotelltilbud",
linkText: "tilbud",
},
},
@@ -114,17 +114,17 @@ export const texts: Record<Lang, Texts> = {
title: "Hov - siden kan ikke findes!",
goToStartPage: {
question: "Vil du gå tilbage til ",
link: "https://www.scandichotels.dk/",
link: "https://www.scandichotels.com/dk/",
linkText: "startsiden",
},
goToDestinations: {
question: "Eller tag en tur til vores ",
link: "https://www.scandichotels.dk/hoteller",
link: "https://www.scandichotels.com/dk/destinationer",
linkText: "destinationer",
},
goToOffers: {
question: " eller seneste ",
link: "https://www.scandichotels.dk/tilbud-og-hotelpakker",
link: "https://www.scandichotels.com/dk/tilbud",
linkText: "tilbud",
},
},