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 type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/contactInformation"
|
||||
import {
|
||||
type ContactInformationProps,
|
||||
GoogleMapsDirections,
|
||||
} from "@/types/components/hotelPage/sidepeek/contactInformation"
|
||||
|
||||
export default async function ContactInformation({
|
||||
hotelAdress,
|
||||
@@ -41,7 +44,7 @@ export default async function ContactInformation({
|
||||
{intl.formatMessage({ id: "Driving directions" })}
|
||||
</Body>
|
||||
<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"
|
||||
color="peach80"
|
||||
textDecoration="underline"
|
||||
@@ -92,7 +95,7 @@ export default async function ContactInformation({
|
||||
{contact.email}
|
||||
</Link>
|
||||
</div>
|
||||
{ecoLabels.nordicEcoLabel ? (
|
||||
{ecoLabels.nordicEcoLabel && (
|
||||
<div className={styles.ecoLabel}>
|
||||
<Image
|
||||
height={38}
|
||||
@@ -109,7 +112,7 @@ export default async function ContactInformation({
|
||||
</Caption>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ export default async function Facility({ data }: FacilityProps) {
|
||||
|
||||
return (
|
||||
<div className={styles.content}>
|
||||
{image.imageSizes.medium && (
|
||||
{image?.imageSizes.medium && (
|
||||
<Image
|
||||
src={image.imageSizes.medium}
|
||||
alt={image.metaData.altText || ""}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { AboutTheHotelSidePeekProps } from "./aboutTheHotel"
|
||||
|
||||
export enum GoogleMapsDirections {
|
||||
BASE_URL = "https://www.google.com/maps/dir/?api=1&destination=",
|
||||
}
|
||||
|
||||
export type ContactInformationProps = Omit<
|
||||
AboutTheHotelSidePeekProps,
|
||||
"descriptions" | "buttonUrl"
|
||||
|
||||
Reference in New Issue
Block a user