Merged in chore/cleanup-my-pages-overview (pull request #3049)

chore(LOY-447): remove flag and unused code on my pages overview

* chore: remove flag and unused code


Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Matilda Landström
2025-11-04 09:15:43 +00:00
parent 4970dfa2ed
commit 0131b5f731
24 changed files with 18 additions and 568 deletions

View File

@@ -1,6 +1,3 @@
import { Divider } from "@scandic-hotels/design-system/Divider"
import { env } from "@/env/server"
import { getProfile } from "@/lib/trpc/memoizedRequests"
import LevelProgressCard from "@/components/MyPages/LevelProgressCard"
@@ -8,10 +5,6 @@ import { Section } from "@/components/Section"
import SectionHeader from "@/components/Section/Header/Deprecated"
import SectionLink from "@/components/Section/Link"
import Friend from "../../Overview/Friend"
import Hero from "../../Overview/Friend/Hero"
import MembershipNumber from "../../Overview/Friend/MembershipNumber"
import Stats from "../../Overview/Stats"
import PointsToSpendCard from "../PointsToSpendCard"
import styles from "./overview.module.css"
@@ -37,23 +30,13 @@ export default async function PointsOverview({
headingAs={"h3"}
headingLevel={"h1"}
/>
{env.ENABLE_NEW_OVERVIEW_SECTION ? (
<div className={styles.membershipCardsContainer}>
<PointsToSpendCard user={user} />
<LevelProgressCard
color="Surface/Brand/Primary 1/Default"
user={user}
/>
</div>
) : (
<Hero color="burgundy">
<Friend membership={user.membership} name={user.name}>
<MembershipNumber color="red" membership={user.membership} />
</Friend>
<Divider className={styles.divider} color="peach" />
<Stats user={user} />
</Hero>
)}
<div className={styles.membershipCardsContainer}>
<PointsToSpendCard user={user} />
<LevelProgressCard
color="Surface/Brand/Primary 1/Default"
user={user}
/>
</div>
<SectionLink link={link} variant="mobile" />
</Section>
)