feat(SW-2873): Move HotelReservationSidePeek to booking-flow * Move sidepeek store to booking-flow * Begin move of HotelReservationSidePeek to booking-flow * Copy Link * Update AccessibilityAccordionItem * Split AccessibilityAccordionItem into two components * Fix tracking for Accordion * Duplicate ButtonLink to booking-flow TEMP * AdditionalAmeneties * wip * Move sidepeek accordion items * Remove temp ButtonLink * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix accordion tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Update exports * Fix self-referencing import * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Add 'use client' to tracking function * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix TEMP folder * Refactor sidepeek tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow Approved-by: Joakim Jäderberg
138 lines
4.3 KiB
TypeScript
138 lines
4.3 KiB
TypeScript
"use client"
|
|
|
|
import { useIntl } from "react-intl"
|
|
|
|
import Body from "@scandic-hotels/design-system/Body"
|
|
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
|
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
|
import Image from "@scandic-hotels/design-system/Image"
|
|
import Link from "@scandic-hotels/design-system/Link"
|
|
|
|
import useLang from "../../hooks/useLang"
|
|
|
|
import styles from "./contact.module.css"
|
|
|
|
import type { Hotel } from "@scandic-hotels/trpc/types/hotel"
|
|
|
|
interface ContactProps {
|
|
hotel: Hotel
|
|
}
|
|
|
|
export default function Contact({ hotel }: ContactProps) {
|
|
const lang = useLang()
|
|
const intl = useIntl()
|
|
|
|
const addressStr = `${hotel.address.streetAddress}, `
|
|
const cityStr = hotel.address.city
|
|
|
|
return (
|
|
<section className={styles.wrapper}>
|
|
<address className={styles.address}>
|
|
<ul className={styles.contactInfo}>
|
|
<li>
|
|
<Body textTransform="bold">
|
|
{intl.formatMessage({
|
|
defaultMessage: "Address",
|
|
})}
|
|
</Body>
|
|
<Body>
|
|
{addressStr}
|
|
<br />
|
|
{cityStr}
|
|
</Body>
|
|
</li>
|
|
<li>
|
|
<Body textTransform="bold">
|
|
{intl.formatMessage({
|
|
defaultMessage: "Driving directions",
|
|
})}
|
|
</Body>
|
|
<Link
|
|
href={`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(
|
|
`${hotel.name}, ${hotel.address.streetAddress}, ${hotel.address.zipCode} ${hotel.address.city}`
|
|
)}`}
|
|
>
|
|
<span className={styles.link}>
|
|
{intl.formatMessage({
|
|
defaultMessage: "Google Maps",
|
|
})}
|
|
</span>
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Body textTransform="bold">
|
|
{intl.formatMessage({
|
|
defaultMessage: "Contact us",
|
|
})}
|
|
</Body>
|
|
<Link href={`tel:${hotel.contactInformation.phoneNumber}`}>
|
|
<span className={styles.link}>
|
|
{hotel.contactInformation.phoneNumber}
|
|
</span>
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
{(hotel.socialMedia.facebook || hotel.socialMedia.instagram) && (
|
|
<>
|
|
<Body textTransform="bold">
|
|
{intl.formatMessage({
|
|
defaultMessage: "Follow us",
|
|
})}
|
|
</Body>
|
|
<div className={styles.soMeIcons}>
|
|
{hotel.socialMedia.instagram && (
|
|
<Link href={hotel.socialMedia.instagram} target="_blank">
|
|
<InstagramIcon color="Icon/Interactive/Default" />
|
|
</Link>
|
|
)}
|
|
{hotel.socialMedia.facebook && (
|
|
<Link href={hotel.socialMedia.facebook} target="_blank">
|
|
<FacebookIcon color="Icon/Interactive/Default" />
|
|
</Link>
|
|
)}
|
|
</div>
|
|
</>
|
|
)}
|
|
</li>
|
|
<li>
|
|
<Body textTransform="bold">
|
|
{intl.formatMessage({
|
|
defaultMessage: "Email",
|
|
})}
|
|
</Body>
|
|
<Link href={`mailto:${hotel.contactInformation.email}`}>
|
|
<span className={styles.link}>
|
|
{hotel.contactInformation.email}
|
|
</span>
|
|
</Link>
|
|
</li>
|
|
</ul>
|
|
</address>
|
|
{hotel.hotelFacts.ecoLabels?.nordicEcoLabel ? (
|
|
<div className={styles.ecoContainer}>
|
|
<div className={styles.ecoLabel}>
|
|
<Image
|
|
height={38}
|
|
width={38}
|
|
alt={intl.formatMessage({
|
|
defaultMessage: "Nordic Swan Ecolabel",
|
|
})}
|
|
src={`/_static/img/icons/swan-eco/swan_eco_dark_${lang}.png`}
|
|
/>
|
|
</div>
|
|
<div className={styles.ecoLabelText}>
|
|
<span>
|
|
{intl.formatMessage({
|
|
defaultMessage: "Nordic Swan Ecolabel",
|
|
})}
|
|
</span>
|
|
<span>
|
|
{hotel.hotelFacts.ecoLabels.svanenEcoLabelCertificateNumber}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
) : null}
|
|
</section>
|
|
)
|
|
}
|