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 Image from "@/components/Image"
|
||||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
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"
|
import type { CardProps } from "@/types/components/blocks/surprises"
|
||||||
|
|
||||||
export default function Card({ title, children }: CardProps) {
|
export default function Card({ title, children }: CardProps) {
|
||||||
|
const intl = useIntl()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<Image
|
<Image
|
||||||
src="/_static/img/loyalty-award.png"
|
src="/_static/img/loyalty-award.png"
|
||||||
width={113}
|
width={113}
|
||||||
height={125}
|
height={125}
|
||||||
alt="Gift"
|
alt={intl.formatMessage({ id: "Surprise!" })}
|
||||||
/>
|
/>
|
||||||
<header>
|
<header>
|
||||||
<Title textAlign="center" level="h4">
|
<Title textAlign="center" level="h4">
|
||||||
|
|||||||
@@ -92,9 +92,6 @@ export default function SurprisesNotification({
|
|||||||
return coupons
|
return coupons
|
||||||
})
|
})
|
||||||
.flat()
|
.flat()
|
||||||
.filter(
|
|
||||||
(coupon): coupon is { rewardId: string; couponCode: string } => !!coupon
|
|
||||||
)
|
|
||||||
|
|
||||||
unwrap.mutate(updates)
|
unwrap.mutate(updates)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user