From b8767dd8f18fcfff91bfef952fc9838b7c7fc59b Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Wed, 20 Nov 2024 13:19:59 +0100 Subject: [PATCH] feat(SW-750): add HotelLocation type --- .../ContactInformation/contactInformation.module.css | 1 + .../AboutTheHotel/ContactInformation/index.tsx | 10 +++++----- components/ContentType/HotelPage/SidePeeks/index.ts | 2 ++ components/ContentType/HotelPage/index.tsx | 5 ++--- types/components/hotelPage/sidepeek/aboutTheHotel.ts | 7 ++----- .../hotelPage/sidepeek/contactInformation.ts | 4 ---- 6 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 components/ContentType/HotelPage/SidePeeks/index.ts diff --git a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/contactInformation.module.css b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/contactInformation.module.css index 56e92dba3..b616382ab 100644 --- a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/contactInformation.module.css +++ b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/contactInformation.module.css @@ -34,6 +34,7 @@ .socialIcons { display: flex; gap: var(--Spacing-x1); + align-items: center; } .email { diff --git a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx index 58dd360c6..7ac140336 100644 --- a/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx +++ b/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx @@ -10,10 +10,7 @@ import { getLang } from "@/i18n/serverContext" import styles from "./contactInformation.module.css" -import { - type ContactInformationProps, - GoogleMapsDirections, -} from "@/types/components/hotelPage/sidepeek/contactInformation" +import type { ContactInformationProps } from "@/types/components/hotelPage/sidepeek/contactInformation" export default async function ContactInformation({ hotelAddress, @@ -24,6 +21,9 @@ export default async function ContactInformation({ }: ContactInformationProps) { const intl = await getIntl() const lang = getLang() + const { latitude, longitude } = coordinates + const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}` + return (
@@ -44,7 +44,7 @@ export default async function ContactInformation({ {intl.formatMessage({ id: "Driving directions" })}