From d782b85329b9f221166781417ccfc7d42d731e29 Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Tue, 27 May 2025 16:34:47 +0200 Subject: [PATCH] chore: remove duplicate upcoming stays block --- .../emptyUpcomingStays.module.css | 2 +- .../EmptyUpcomingStays/index.tsx | 0 .../DynamicContent/Stays/Soonest/index.tsx | 2 +- .../emptyUpcomingStays.module.css | 32 ------------ .../Upcoming/EmptyUpcomingStays/index.tsx | 50 ------------------- .../DynamicContent/Stays/Upcoming/index.tsx | 2 +- 6 files changed, 3 insertions(+), 85 deletions(-) rename apps/scandic-web/components/Blocks/DynamicContent/Stays/{Soonest => }/EmptyUpcomingStays/emptyUpcomingStays.module.css (93%) rename apps/scandic-web/components/Blocks/DynamicContent/Stays/{Soonest => }/EmptyUpcomingStays/index.tsx (100%) delete mode 100644 apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/emptyUpcomingStays.module.css delete mode 100644 apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/emptyUpcomingStays.module.css b/apps/scandic-web/components/Blocks/DynamicContent/Stays/EmptyUpcomingStays/emptyUpcomingStays.module.css similarity index 93% rename from apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/emptyUpcomingStays.module.css rename to apps/scandic-web/components/Blocks/DynamicContent/Stays/EmptyUpcomingStays/emptyUpcomingStays.module.css index 108015d9a..8f7937796 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/emptyUpcomingStays.module.css +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/EmptyUpcomingStays/emptyUpcomingStays.module.css @@ -4,7 +4,7 @@ background-color: var(--Base-Surface-Primary-light-Normal); border-radius: var(--Corner-radius-md); min-height: 250px; - margin-bottom: var(--Spacing-x-half); + margin-bottom: var(--Space-x05); overflow: hidden; } diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/EmptyUpcomingStays/index.tsx similarity index 100% rename from apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/EmptyUpcomingStays/index.tsx rename to apps/scandic-web/components/Blocks/DynamicContent/Stays/EmptyUpcomingStays/index.tsx diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/index.tsx index 6aa38ad71..b72e0aea7 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Soonest/index.tsx @@ -5,8 +5,8 @@ import SectionHeader from "@/components/Section/Header" import SectionLink from "@/components/Section/Link" import Grids from "@/components/TempDesignSystem/Grids" +import EmptyUpcomingStaysBlock from "../EmptyUpcomingStays" import StayCard from "../StayCard" -import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays" import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/emptyUpcomingStays.module.css b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/emptyUpcomingStays.module.css deleted file mode 100644 index 108015d9a..000000000 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/emptyUpcomingStays.module.css +++ /dev/null @@ -1,32 +0,0 @@ -.container { - display: grid; - grid-template-rows: 1fr min(50px); - background-color: var(--Base-Surface-Primary-light-Normal); - border-radius: var(--Corner-radius-md); - min-height: 250px; - margin-bottom: var(--Spacing-x-half); - overflow: hidden; -} - -.titleContainer { - display: flex; - justify-content: center; - align-items: center; - background-color: var(--Scandic-Brand-Pale-Peach); -} - -.title { - display: flex; - flex-direction: column; - align-items: center; -} - -.burgundyTitle { - color: var(--Scandic-Brand-Burgundy); -} - -.link { - display: flex; - justify-content: center; - align-items: center; -} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx deleted file mode 100644 index c54bb55e6..000000000 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/EmptyUpcomingStays/index.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" - -import { env } from "@/env/server" - -import Link from "@/components/TempDesignSystem/Link" -import Title from "@/components/TempDesignSystem/Text/Title" -import { getIntl } from "@/i18n" -import { getLang } from "@/i18n/serverContext" -import { getCurrentWebUrl } from "@/utils/url" - -import styles from "./emptyUpcomingStays.module.css" - -export default async function EmptyUpcomingStaysBlock() { - const intl = await getIntl() - const lang = await getLang() - const baseUrl = env.PUBLIC_URL || "https://www.scandichotels.com" - - const href = !env.isLangLive(lang) - ? getCurrentWebUrl({ path: "/", lang, baseUrl }) - : `/${lang}` - - return ( -
-
- - {intl.formatMessage({ - defaultMessage: "You have no upcoming stays.", - })} - <span className={styles.burgundyTitle}> - {intl.formatMessage({ - defaultMessage: "Where should you go next?", - })} - </span> - -
- - {intl.formatMessage({ - defaultMessage: "Get inspired", - })} - - -
- ) -} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/index.tsx index fe2f5add4..77f4df7dd 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Stays/Upcoming/index.tsx @@ -4,8 +4,8 @@ import SectionContainer from "@/components/Section/Container" import SectionHeader from "@/components/Section/Header" import SectionLink from "@/components/Section/Link" +import EmptyUpcomingStaysBlock from "../EmptyUpcomingStays" import ClientUpcomingStays from "./Client" -import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays" import styles from "./upcoming.module.css"