Merged in feat/best-friend-hero (pull request #338)

Feat(SW-170): Update overview hero

Approved-by: Christel Westerberg
This commit is contained in:
Matilda Landström
2024-07-12 06:45:44 +00:00
parent c1892ace66
commit 801a041404
48 changed files with 595 additions and 203 deletions

View File

@@ -10,6 +10,8 @@ import SoonestStays from "@/components/MyPages/Blocks/Stays/Soonest"
import UpcomingStays from "@/components/MyPages/Blocks/Stays/Upcoming"
import { removeMultipleSlashes } from "@/utils/url"
import PointsOverview from "../Blocks/Points/Overview"
import {
AccountPageContentProps,
ContentProps,
@@ -23,6 +25,8 @@ function DynamicComponent({ component, props }: AccountPageContentProps) {
switch (component) {
case DynamicContentComponents.membership_overview:
return <Overview {...props} />
case DynamicContentComponents.points_overview:
return <PointsOverview {...props} />
case DynamicContentComponents.previous_stays:
return <PreviousStays {...props} />
case DynamicContentComponents.soonest_stays:

View File

@@ -8,6 +8,7 @@ import CurrentBenefitsBlock from "../../Blocks/Benefits/CurrentLevel"
import NextLevelBenefitsBlock from "../../Blocks/Benefits/NextLevel"
import CurrentPointsBalance from "../../Blocks/Points/CurrentPointsBalance"
import EarnAndBurn from "../../Blocks/Points/EarnAndBurn"
import PointsOverview from "../../Blocks/Points/Overview"
import {
AccountPageContentProps,
@@ -21,14 +22,9 @@ import {
function DynamicComponent({ component, props }: AccountPageContentProps) {
switch (component) {
case DynamicContentComponents.membership_overview:
return (
<Overview
lang={props.lang}
link={props.link}
subtitle={null}
title={props.title}
/>
)
return <Overview {...props} />
case DynamicContentComponents.points_overview:
return <PointsOverview {...props} />
case DynamicContentComponents.current_benefits:
return <CurrentBenefitsBlock {...props} />
case DynamicContentComponents.next_benefits: