diff --git a/apps/scandic-web/components/Blocks/CardsGrid.tsx b/apps/scandic-web/components/Blocks/CardsGrid.tsx index 2c962d063..49dff04fc 100644 --- a/apps/scandic-web/components/Blocks/CardsGrid.tsx +++ b/apps/scandic-web/components/Blocks/CardsGrid.tsx @@ -10,10 +10,7 @@ import type { CardsGridProps } from "@/types/components/blocks/cardsGrid" import { CardsGridEnum, CardsGridLayoutEnum } from "@/types/enums/cardsGrid" import type { StackableGridProps } from "../TempDesignSystem/Grids/Stackable/stackable" -export default function CardsGrid({ - cards_grid, - firstItem = false, -}: CardsGridProps) { +export default function CardsGrid({ cards_grid }: CardsGridProps) { let columns: StackableGridProps["columns"] switch (cards_grid.layout) { @@ -35,8 +32,8 @@ export default function CardsGrid({ {cards_grid.cards.map((card, index) => { @@ -45,7 +42,7 @@ export default function CardsGrid({ return ( +
{intl.formatMessage({ id: "How it works" })}
diff --git a/apps/scandic-web/components/Blocks/DynamicContent/LoyaltyLevels/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/LoyaltyLevels/index.tsx index 0f3884d3a..d5114f1a2 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/LoyaltyLevels/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/LoyaltyLevels/index.tsx @@ -18,14 +18,13 @@ import type { LevelCardProps } from "@/types/components/overviewTable" export default async function LoyaltyLevels({ dynamic_content, - firstItem, }: LoyaltyLevelsProps) { const uniqueLevels = await serverClient().contentstack.rewards.all({ unique: true, }) return ( - +
{uniqueLevels.map((level) => ( diff --git a/apps/scandic-web/components/Blocks/DynamicContent/OverviewTable/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/OverviewTable/index.tsx index 062f7f32e..1f3e5cf33 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/OverviewTable/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/OverviewTable/index.tsx @@ -8,7 +8,6 @@ import type { OverviewTableProps } from "@/types/components/blocks/dynamicConten export default async function OverviewTable({ dynamic_content, - firstItem, }: OverviewTableProps) { const [levels, membershipLevel] = await Promise.all([ serverClient().contentstack.rewards.all(), @@ -16,7 +15,7 @@ export default async function OverviewTable({ ]) return ( - + ) { const displayHeader = !!( dynamic_content.link || @@ -21,8 +20,8 @@ export default function SectionWrapper({ link={dynamic_content.link} preamble={dynamic_content.subtitle} title={dynamic_content.title} - headingAs={firstItem ? "h3" : "h4"} - headingLevel={firstItem ? "h1" : "h2"} + headingAs="h3" + headingLevel="h2" /> ) : null} {children} diff --git a/apps/scandic-web/components/Blocks/DynamicContent/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/index.tsx index 0cf1ec991..402eeb843 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/index.tsx @@ -33,7 +33,7 @@ export default function DynamicContent(props: DynamicContentProps) { } function DynamicContentBlocks(props: DynamicContentProps) { - const { dynamic_content, firstItem } = props + const { dynamic_content } = props switch (dynamic_content.component) { case DynamicContentEnum.Blocks.components.current_benefits: return @@ -44,29 +44,17 @@ function DynamicContentBlocks(props: DynamicContentProps) { ) case DynamicContentEnum.Blocks.components.how_it_works: - return ( - - ) + return case DynamicContentEnum.Blocks.components.jobylon_feed: return case DynamicContentEnum.Blocks.components.loyalty_levels: - return ( - - ) + return case DynamicContentEnum.Blocks.components.membership_overview: return case DynamicContentEnum.Blocks.components.next_benefits: return case DynamicContentEnum.Blocks.components.overview_table: - return ( - - ) + return case DynamicContentEnum.Blocks.components.points_overview: return case DynamicContentEnum.Blocks.components.previous_stays: diff --git a/apps/scandic-web/components/Blocks/ShortcutsList/index.tsx b/apps/scandic-web/components/Blocks/ShortcutsList/index.tsx index 31bf12333..29c067c7e 100644 --- a/apps/scandic-web/components/Blocks/ShortcutsList/index.tsx +++ b/apps/scandic-web/components/Blocks/ShortcutsList/index.tsx @@ -8,7 +8,6 @@ import styles from "./shortcutsList.module.css" import type { ShortcutsListProps } from "@/types/components/blocks/shortcuts" export default function ShortcutsList({ - firstItem = false, shortcuts, subtitle, title, @@ -39,8 +38,8 @@ export default function ShortcutsList({
{columns.map(({ id, column }) => ( diff --git a/apps/scandic-web/components/Blocks/index.tsx b/apps/scandic-web/components/Blocks/index.tsx index ff8f836d0..d32ef44dc 100644 --- a/apps/scandic-web/components/Blocks/index.tsx +++ b/apps/scandic-web/components/Blocks/index.tsx @@ -20,7 +20,6 @@ import { BlocksEnums } from "@/types/enums/blocks" export default function Blocks({ blocks }: BlocksProps) { return blocks.map(async (block, idx) => { - const firstItem = idx === 0 switch (block.typename) { case BlocksEnums.block.Accordion: return ( @@ -35,7 +34,6 @@ export default function Blocks({ blocks }: BlocksProps) { ) case BlocksEnums.block.Content: @@ -51,7 +49,6 @@ export default function Blocks({ blocks }: BlocksProps) { return ( ) @@ -87,7 +84,6 @@ export default function Blocks({ blocks }: BlocksProps) { case BlocksEnums.block.Shortcuts: return ( { - const firstItem = idx === 0 switch (block.typename) { case BlocksEnums.block.CardsGrid: return ( @@ -45,7 +44,6 @@ export default function Blocks({ blocks }: BlocksProps) { return ( ) @@ -57,7 +55,6 @@ export default function Blocks({ blocks }: BlocksProps) { return ( { - firstItem?: boolean -} +export interface CardsGridProps extends Pick {} diff --git a/apps/scandic-web/types/components/blocks/dynamicContent.ts b/apps/scandic-web/types/components/blocks/dynamicContent.ts index 98639e13c..1c67f0512 100644 --- a/apps/scandic-web/types/components/blocks/dynamicContent.ts +++ b/apps/scandic-web/types/components/blocks/dynamicContent.ts @@ -3,20 +3,8 @@ import type { DynamicContent } from "@/types/trpc/routers/contentstack/blocks" interface PartialDynamicContent extends Pick {} -export interface DynamicContentProps extends PartialDynamicContent { - firstItem: boolean -} - -export interface HowItWorksProps extends PartialDynamicContent { - firstItem: boolean -} - -export interface LoyaltyLevelsProps extends PartialDynamicContent { - firstItem: boolean -} - -export interface OverviewTableProps extends PartialDynamicContent { - firstItem: boolean -} - +export interface DynamicContentProps extends PartialDynamicContent {} +export interface HowItWorksProps extends PartialDynamicContent {} +export interface LoyaltyLevelsProps extends PartialDynamicContent {} +export interface OverviewTableProps extends PartialDynamicContent {} export interface SignupFormWrapperProps extends PartialDynamicContent {} diff --git a/apps/scandic-web/types/components/blocks/shortcuts.ts b/apps/scandic-web/types/components/blocks/shortcuts.ts index b13771fe2..75d2762fc 100644 --- a/apps/scandic-web/types/components/blocks/shortcuts.ts +++ b/apps/scandic-web/types/components/blocks/shortcuts.ts @@ -1,8 +1,6 @@ import type { Shortcut } from "@/types/trpc/routers/contentstack/blocks" -export interface ShortcutsListProps extends Shortcut { - firstItem?: boolean -} +export interface ShortcutsListProps extends Shortcut {} export type ShortcutsListItemsProps = { className?: string