Merged in feat/SW-1296-hotel-subpages (pull request #1233)
feat(SW-1296): added Subpage for hotel pages and its routing * feat(SW-1296): added Subpage for hotel pages and its routing Approved-by: Fredrik Thorsson
This commit is contained in:
+22
-13
@@ -1,3 +1,5 @@
|
||||
import { parkingSubPage } from "@/constants/routes/hotelSubpages"
|
||||
|
||||
import { OpenInNewIcon } from "@/components/Icons"
|
||||
import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
@@ -6,6 +8,7 @@ import Link from "@/components/TempDesignSystem/Link"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import ParkingList from "./ParkingList"
|
||||
import ParkingPrices from "./ParkingPrices"
|
||||
@@ -20,6 +23,7 @@ export default async function ParkingAmenity({
|
||||
parkingElevatorPitch,
|
||||
hasExtraParkingPage,
|
||||
}: ParkingAmenityProps) {
|
||||
const lang = getLang()
|
||||
const intl = await getIntl()
|
||||
|
||||
return (
|
||||
@@ -85,20 +89,25 @@ export default async function ParkingAmenity({
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
{hasExtraParkingPage && (
|
||||
<Button
|
||||
className={styles.parkingPageLink}
|
||||
theme="base"
|
||||
intent="secondary"
|
||||
asChild
|
||||
>
|
||||
{/* TODO: URL Should possibly be something more dynamic */}
|
||||
<Link
|
||||
href={`/${parkingSubPage[lang]}`}
|
||||
color="burgundy"
|
||||
weight="bold"
|
||||
appendToCurrentPath
|
||||
>
|
||||
{intl.formatMessage({ id: "About parking" })}
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
{hasExtraParkingPage && (
|
||||
<Button
|
||||
className={styles.parkingPageLink}
|
||||
theme="base"
|
||||
intent="secondary"
|
||||
asChild
|
||||
>
|
||||
{/* TODO: Add URL to separate parking page */}
|
||||
<Link href="#" color="burgundy" weight="bold">
|
||||
{intl.formatMessage({ id: "About parking" })}
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user