From dd2127749a32cc0ba55461b5f88d6273cec94eeb Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Wed, 24 Apr 2024 10:52:46 +0200 Subject: [PATCH] chore: make Stays title prop optional --- components/MyPages/AccountPage/Content.tsx | 2 +- components/MyPages/Blocks/Stays/Previous/index.tsx | 2 +- components/MyPages/Blocks/Stays/Soonest/index.tsx | 2 +- components/MyPages/Blocks/Stays/Upcoming/index.tsx | 2 +- types/components/myPages/myStays/title.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/MyPages/AccountPage/Content.tsx b/components/MyPages/AccountPage/Content.tsx index 0fdbb1120..b3e46a9a6 100644 --- a/components/MyPages/AccountPage/Content.tsx +++ b/components/MyPages/AccountPage/Content.tsx @@ -54,7 +54,7 @@ export default function Content({ user, lang, content }: ContentProps) { const componentProps = { lang, title: item.dynamic_content.title, - // TODO: rename preamble to subtitle in Contentstack + // TODO: rename preamble to subtitle in Contentstack? subtitle: item.dynamic_content.preamble, ...(link && { link }), } diff --git a/components/MyPages/Blocks/Stays/Previous/index.tsx b/components/MyPages/Blocks/Stays/Previous/index.tsx index 5665d3b31..f5205da1d 100644 --- a/components/MyPages/Blocks/Stays/Previous/index.tsx +++ b/components/MyPages/Blocks/Stays/Previous/index.tsx @@ -14,7 +14,7 @@ import type { Page } from "@/types/components/myPages/myStays/page" export default function PreviousStays({ lang, - title = "", // TODO: Should the title be optional? + title, subtitle, link, }: AccountPageComponentProps) { diff --git a/components/MyPages/Blocks/Stays/Soonest/index.tsx b/components/MyPages/Blocks/Stays/Soonest/index.tsx index 8e5e7c8ed..521bb84c4 100644 --- a/components/MyPages/Blocks/Stays/Soonest/index.tsx +++ b/components/MyPages/Blocks/Stays/Soonest/index.tsx @@ -10,7 +10,7 @@ import { AccountPageComponentProps } from "@/types/components/myPages/myPage/acc export default async function UpcomingStays({ lang, - title = "", // TODO: Should this be optional? + title, subtitle, link, }: AccountPageComponentProps) { diff --git a/components/MyPages/Blocks/Stays/Upcoming/index.tsx b/components/MyPages/Blocks/Stays/Upcoming/index.tsx index 379d76fb3..05d4f3882 100644 --- a/components/MyPages/Blocks/Stays/Upcoming/index.tsx +++ b/components/MyPages/Blocks/Stays/Upcoming/index.tsx @@ -16,7 +16,7 @@ import type { Page } from "@/types/components/myPages/myStays/page" export default function UpcomingStays({ lang, - title = "", // TODO: Should this be optional? + title, subtitle, link, }: AccountPageComponentProps) { diff --git a/types/components/myPages/myStays/title.ts b/types/components/myPages/myStays/title.ts index 3e4839b11..33128cac0 100644 --- a/types/components/myPages/myStays/title.ts +++ b/types/components/myPages/myStays/title.ts @@ -1,5 +1,5 @@ export type HeaderProps = { - title: string + title?: string subtitle?: string link?: { href: string; text: string } }