SW-3490 set metadata for routes * feat(SW-3490): Set metadata title for hotelreservation paths Approved-by: Anton Gunnarsson
28 lines
630 B
TypeScript
28 lines
630 B
TypeScript
import { getTitlePrefix } from "@/utils/metadata/title/getTitlePrefix"
|
|
|
|
import type { Metadata } from "next"
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
return {
|
|
title: {
|
|
template: combineSegments([getTitlePrefix(), "%s", "Scandic Hotels"]),
|
|
default: combineSegments([getTitlePrefix(), "Scandic Hotels"]),
|
|
},
|
|
}
|
|
}
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return <>{children}</>
|
|
}
|
|
|
|
function combineSegments(
|
|
segments: (string | null | undefined)[],
|
|
delimiter = " | "
|
|
) {
|
|
return segments.filter(Boolean).join(delimiter).trim()
|
|
}
|