From 3508253afe3cee917dc0dee26551213cd599ff4f Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Mon, 21 Oct 2024 10:03:48 +0200 Subject: [PATCH] fix(SW-556): removed old caption label component, fixed outline on button --- .../Rewards/Surprises/index.tsx | 23 +++--- .../Rewards/Surprises/surprises.module.css | 8 ++ .../Text/CaptionLabel/captionLabel.module.css | 77 ------------------- .../Text/CaptionLabel/captionLabel.ts | 10 --- .../Text/CaptionLabel/index.tsx | 32 -------- .../Text/CaptionLabel/variants.ts | 58 -------------- 6 files changed, 19 insertions(+), 189 deletions(-) delete mode 100644 components/TempDesignSystem/Text/CaptionLabel/captionLabel.module.css delete mode 100644 components/TempDesignSystem/Text/CaptionLabel/captionLabel.ts delete mode 100644 components/TempDesignSystem/Text/CaptionLabel/index.tsx delete mode 100644 components/TempDesignSystem/Text/CaptionLabel/variants.ts diff --git a/components/Blocks/DynamicContent/Rewards/Surprises/index.tsx b/components/Blocks/DynamicContent/Rewards/Surprises/index.tsx index 86d1ab2c5..66abfaa45 100644 --- a/components/Blocks/DynamicContent/Rewards/Surprises/index.tsx +++ b/components/Blocks/DynamicContent/Rewards/Surprises/index.tsx @@ -14,7 +14,6 @@ import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" -import CaptionLabel from "@/components/TempDesignSystem/Text/CaptionLabel" import Title from "@/components/TempDesignSystem/Text/Title" import { toast } from "@/components/TempDesignSystem/Toasts" import useLang from "@/hooks/useLang" @@ -39,13 +38,15 @@ export default function Surprises({ return null } + const surprise = surprises[selectedSurprise] + function showSurprise(n: number) { setSelectedSurprise((surprise) => surprise + n) } - function viewRewards(id?: string) { - if (id) { - update.mutate({ id }) + function viewRewards() { + if (surprise.id) { + update.mutate({ id: surprise.id }) } } @@ -69,13 +70,12 @@ export default function Surprises({ } } - const surprise = surprises[selectedSurprise] - return ( @@ -84,7 +84,7 @@ export default function Surprises({ <>
{surprises.length > 1 && showSurprises && ( - + {intl.formatMessage( { id: "{amount} out of {total}" }, { @@ -92,7 +92,7 @@ export default function Surprises({ total: surprises.length, } )} - + )}