fix(SW-696): remove redundant filter, add translation

This commit is contained in:
Christian Andolf
2024-11-19 09:12:54 +01:00
parent e294d39fdf
commit 848338248f
2 changed files with 5 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
import { useIntl } from "react-intl"
import Image from "@/components/Image"
import Title from "@/components/TempDesignSystem/Text/Title"
@@ -6,13 +8,15 @@ import styles from "./surprises.module.css"
import type { CardProps } from "@/types/components/blocks/surprises"
export default function Card({ title, children }: CardProps) {
const intl = useIntl()
return (
<div className={styles.content}>
<Image
src="/_static/img/loyalty-award.png"
width={113}
height={125}
alt="Gift"
alt={intl.formatMessage({ id: "Surprise!" })}
/>
<header>
<Title textAlign="center" level="h4">

View File

@@ -92,9 +92,6 @@ export default function SurprisesNotification({
return coupons
})
.flat()
.filter(
(coupon): coupon is { rewardId: string; couponCode: string } => !!coupon
)
unwrap.mutate(updates)
}