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:
@@ -1,4 +1,5 @@
|
|||||||
|
import NotFound from "@/components/NotFound"
|
||||||
|
|
||||||
export default function NotFoundPage() {
|
export default function NotFoundPage() {
|
||||||
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
|
return <NotFound />
|
||||||
return <div>Not Found</div>
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
import NotFound from "@/components/NotFound"
|
||||||
|
|
||||||
export default function NotFoundPage() {
|
export default function NotFoundPage() {
|
||||||
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
|
return <NotFound />
|
||||||
return <div>Not Found, missing lang in url?</div>
|
|
||||||
}
|
}
|
||||||
|
|||||||
61
apps/partner-sas/components/NotFound/Texts.ts
Normal file
61
apps/partner-sas/components/NotFound/Texts.ts
Normal 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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
32
apps/partner-sas/components/NotFound/index.tsx
Normal file
32
apps/partner-sas/components/NotFound/index.tsx
Normal 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>
|
||||||
|
)
|
||||||
|
}
|
||||||
68
apps/partner-sas/components/NotFound/notFound.module.css
Normal file
68
apps/partner-sas/components/NotFound/notFound.module.css
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Sorry, page not found.",
|
title: "Sorry, page not found.",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Would you like to go back to the ",
|
question: "Would you like to go back to the ",
|
||||||
link: "https://www.scandichotels.com/",
|
link: "https://www.scandichotels.com/en",
|
||||||
linkText: "startpage",
|
linkText: "startpage",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
@@ -42,17 +42,17 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Oj då, vi kunde inte hitta sidan du söker.",
|
title: "Oj då, vi kunde inte hitta sidan du söker.",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Vill du gå tillbaka till ",
|
question: "Vill du gå tillbaka till ",
|
||||||
link: "https://www.scandichotels.se/",
|
link: "https://www.scandichotels.com/sv",
|
||||||
linkText: "startsidan",
|
linkText: "startsidan",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
question: "Eller resa till våra ",
|
question: "Eller resa till våra ",
|
||||||
link: "https://www.scandichotels.se/hotell",
|
link: "https://www.scandichotels.com/sv/destinationer",
|
||||||
linkText: "destinationer",
|
linkText: "destinationer",
|
||||||
},
|
},
|
||||||
goToOffers: {
|
goToOffers: {
|
||||||
question: " eller se våra senaste ",
|
question: " eller se våra senaste ",
|
||||||
link: "https://www.scandichotels.se/erbjudanden-och-weekendpaket",
|
link: "https://www.scandichotels.com/sv/erbjudanden",
|
||||||
linkText: "erbjudanden",
|
linkText: "erbjudanden",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -60,17 +60,17 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Tut uns leid, Seite nicht gefunden.",
|
title: "Tut uns leid, Seite nicht gefunden.",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Möchten Sie zurück zur ",
|
question: "Möchten Sie zurück zur ",
|
||||||
link: "https://www.scandichotels.de/",
|
link: "https://www.scandichotels.com/de/",
|
||||||
linkText: "Startseite",
|
linkText: "Startseite",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
question: "Oder machen Sie einen Ausflug zu unseren ",
|
question: "Oder machen Sie einen Ausflug zu unseren ",
|
||||||
link: "https://www.scandichotels.de/hotelsuche",
|
link: "https://www.scandichotels.com/de/reiseziele",
|
||||||
linkText: "Reisezielen",
|
linkText: "Reisezielen",
|
||||||
},
|
},
|
||||||
goToOffers: {
|
goToOffers: {
|
||||||
question: " und aktuellen ",
|
question: " und aktuellen ",
|
||||||
link: "https://www.scandichotels.de/angebote-arrangements",
|
link: "https://www.scandichotels.com/de/angebote",
|
||||||
linkText: "Angeboten",
|
linkText: "Angeboten",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -78,17 +78,17 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Valitettavasti sivua ei löydy.",
|
title: "Valitettavasti sivua ei löydy.",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Haluaisitko mennä takaisin ",
|
question: "Haluaisitko mennä takaisin ",
|
||||||
link: "https://www.scandichotels.fi/",
|
link: "https://www.scandichotels.com/fi/",
|
||||||
linkText: "etusivulle",
|
linkText: "etusivulle",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
question: "Voit myös tutustu ",
|
question: "Voit myös tutustu ",
|
||||||
link: "https://www.scandichotels.fi/hotellit",
|
link: "https://www.scandichotels.com/fi/kohteet",
|
||||||
linkText: "kohteisiimme",
|
linkText: "kohteisiimme",
|
||||||
},
|
},
|
||||||
goToOffers: {
|
goToOffers: {
|
||||||
question: " tai ajankohtaisiin ",
|
question: " tai ajankohtaisiin ",
|
||||||
link: "https://www.scandichotels.fi/tarjoukset",
|
link: "https://www.scandichotels.com/fi/tarjoukset",
|
||||||
linkText: "tarjouksiimme",
|
linkText: "tarjouksiimme",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -96,17 +96,17 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Oi da, vi fant ikke siden du lette etter...",
|
title: "Oi da, vi fant ikke siden du lette etter...",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Vil du gå tilbake til ",
|
question: "Vil du gå tilbake til ",
|
||||||
link: "https://www.scandichotels.no/",
|
link: "https://www.scandichotels.com/no/",
|
||||||
linkText: "startsiden",
|
linkText: "startsiden",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
question: "Eller ta en tur til våre ",
|
question: "Eller ta en tur til våre ",
|
||||||
link: "https://www.scandichotels.no/hotell",
|
link: "https://www.scandichotels.com/no/destinasjoner",
|
||||||
linkText: "destinasjoner",
|
linkText: "destinasjoner",
|
||||||
},
|
},
|
||||||
goToOffers: {
|
goToOffers: {
|
||||||
question: " eller siste ",
|
question: " eller siste ",
|
||||||
link: "https://www.scandichotels.no/hotelltilbud",
|
link: "https://www.scandichotels.com/no/hotelltilbud",
|
||||||
linkText: "tilbud",
|
linkText: "tilbud",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -114,17 +114,17 @@ export const texts: Record<Lang, Texts> = {
|
|||||||
title: "Hov - siden kan ikke findes!",
|
title: "Hov - siden kan ikke findes!",
|
||||||
goToStartPage: {
|
goToStartPage: {
|
||||||
question: "Vil du gå tilbage til ",
|
question: "Vil du gå tilbage til ",
|
||||||
link: "https://www.scandichotels.dk/",
|
link: "https://www.scandichotels.com/dk/",
|
||||||
linkText: "startsiden",
|
linkText: "startsiden",
|
||||||
},
|
},
|
||||||
goToDestinations: {
|
goToDestinations: {
|
||||||
question: "Eller tag en tur til vores ",
|
question: "Eller tag en tur til vores ",
|
||||||
link: "https://www.scandichotels.dk/hoteller",
|
link: "https://www.scandichotels.com/dk/destinationer",
|
||||||
linkText: "destinationer",
|
linkText: "destinationer",
|
||||||
},
|
},
|
||||||
goToOffers: {
|
goToOffers: {
|
||||||
question: " eller seneste ",
|
question: " eller seneste ",
|
||||||
link: "https://www.scandichotels.dk/tilbud-og-hotelpakker",
|
link: "https://www.scandichotels.com/dk/tilbud",
|
||||||
linkText: "tilbud",
|
linkText: "tilbud",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user