feat(SW-750): add base url
This commit is contained in:
@@ -10,7 +10,10 @@ import { getLang } from "@/i18n/serverContext"
|
|||||||
|
|
||||||
import styles from "./contactInformation.module.css"
|
import styles from "./contactInformation.module.css"
|
||||||
|
|
||||||
import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/contactInformation"
|
import {
|
||||||
|
type ContactInformationProps,
|
||||||
|
GoogleMapsDirections,
|
||||||
|
} from "@/types/components/hotelPage/sidepeek/contactInformation"
|
||||||
|
|
||||||
export default async function ContactInformation({
|
export default async function ContactInformation({
|
||||||
hotelAdress,
|
hotelAdress,
|
||||||
@@ -41,7 +44,7 @@ export default async function ContactInformation({
|
|||||||
{intl.formatMessage({ id: "Driving directions" })}
|
{intl.formatMessage({ id: "Driving directions" })}
|
||||||
</Body>
|
</Body>
|
||||||
<Link
|
<Link
|
||||||
href={`https://www.google.com/maps/dir/?api=1&destination=${coordinates.lat},${coordinates.lng}`}
|
href={`${GoogleMapsDirections.BASE_URL}${coordinates.lat},${coordinates.lng}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
color="peach80"
|
color="peach80"
|
||||||
textDecoration="underline"
|
textDecoration="underline"
|
||||||
@@ -92,7 +95,7 @@ export default async function ContactInformation({
|
|||||||
{contact.email}
|
{contact.email}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
{ecoLabels.nordicEcoLabel ? (
|
{ecoLabels.nordicEcoLabel && (
|
||||||
<div className={styles.ecoLabel}>
|
<div className={styles.ecoLabel}>
|
||||||
<Image
|
<Image
|
||||||
height={38}
|
height={38}
|
||||||
@@ -109,7 +112,7 @@ export default async function ContactInformation({
|
|||||||
</Caption>
|
</Caption>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default async function Facility({ data }: FacilityProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
{image.imageSizes.medium && (
|
{image?.imageSizes.medium && (
|
||||||
<Image
|
<Image
|
||||||
src={image.imageSizes.medium}
|
src={image.imageSizes.medium}
|
||||||
alt={image.metaData.altText || ""}
|
alt={image.metaData.altText || ""}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel"
|
import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel"
|
||||||
|
|
||||||
|
export enum GoogleMapsDirections {
|
||||||
|
BASE_URL = "https://www.google.com/maps/dir/?api=1&destination=",
|
||||||
|
}
|
||||||
|
|
||||||
export type ContactInformationProps = Omit<
|
export type ContactInformationProps = Omit<
|
||||||
AboutTheHotelSidePeekProps,
|
AboutTheHotelSidePeekProps,
|
||||||
"descriptions" | "buttonUrl"
|
"descriptions" | "buttonUrl"
|
||||||
|
|||||||
Reference in New Issue
Block a user