fix(SW-696): remove redundant filter, add translation
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -92,9 +92,6 @@ export default function SurprisesNotification({
|
||||
return coupons
|
||||
})
|
||||
.flat()
|
||||
.filter(
|
||||
(coupon): coupon is { rewardId: string; couponCode: string } => !!coupon
|
||||
)
|
||||
|
||||
unwrap.mutate(updates)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user