refactor(LOY-175): rewrite reward types according to new api endpoints
This commit is contained in:
@@ -22,6 +22,12 @@ export default function Campaign() {
|
||||
return null
|
||||
}
|
||||
|
||||
if (reward.data.rewardType !== "Campaign") {
|
||||
return null
|
||||
}
|
||||
|
||||
const operaRewardId = reward.data.operaRewardId
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.modalContent}>
|
||||
@@ -35,7 +41,7 @@ export default function Campaign() {
|
||||
{intl.formatMessage({ id: "Promo code" })}
|
||||
</Caption>
|
||||
<Caption textAlign="center" color="uiTextHighContrast">
|
||||
{reward.operaRewardId}
|
||||
{operaRewardId}
|
||||
</Caption>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +49,7 @@ export default function Campaign() {
|
||||
<Button
|
||||
onClick={() => {
|
||||
try {
|
||||
navigator.clipboard.writeText(reward.operaRewardId)
|
||||
navigator.clipboard.writeText(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