chore: remove unused filter modal
remove old cms model refactor reward types
This commit is contained in:
@@ -10,24 +10,14 @@ import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { toast } from "@/components/TempDesignSystem/Toasts"
|
||||
|
||||
import { RewardIcon } from "../../RewardIcon"
|
||||
import useRedeemFlow from "../useRedeemFlow"
|
||||
|
||||
import styles from "../redeem.module.css"
|
||||
|
||||
export default function Campaign() {
|
||||
const { reward } = useRedeemFlow()
|
||||
import type { Campaign } from "@/types/components/myPages/rewards"
|
||||
|
||||
export default function Campaign({ reward }: { reward: Campaign }) {
|
||||
const intl = useIntl()
|
||||
|
||||
if (!reward) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (reward.data.rewardType !== "Campaign") {
|
||||
return null
|
||||
}
|
||||
|
||||
const operaRewardId = reward.data.operaRewardId
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.modalContent}>
|
||||
@@ -41,7 +31,7 @@ export default function Campaign() {
|
||||
{intl.formatMessage({ id: "Promo code" })}
|
||||
</Caption>
|
||||
<Caption textAlign="center" color="uiTextHighContrast">
|
||||
{operaRewardId}
|
||||
{reward.operaRewardId}
|
||||
</Caption>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,7 +39,7 @@ export default function Campaign() {
|
||||
<Button
|
||||
onClick={() => {
|
||||
try {
|
||||
navigator.clipboard.writeText(operaRewardId)
|
||||
navigator.clipboard.writeText(reward.operaRewardId)
|
||||
toast.success(intl.formatMessage({ id: "Copied to clipboard" }))
|
||||
} catch {
|
||||
toast.error(intl.formatMessage({ id: "Failed to copy" }))
|
||||
|
||||
Reference in New Issue
Block a user