Skip to content

Commit b7c8c5f

Browse files
committed
feat: mask Merit campaign when aprs are not found
appear when some campaigns are temporary disabled
1 parent 3303015 commit b7c8c5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hooks/useMeritIncentives.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export enum MeritAction {
1616
type MeritIncentives = {
1717
totalAPR: number;
1818
actionsAPR: {
19-
[key in MeritAction]: number;
19+
[key in MeritAction]: number | null | undefined;
2020
};
2121
};
2222

@@ -141,6 +141,10 @@ export const useMeritIncentives = ({
141141

142142
const APR = data.actionsAPR[incentive.action];
143143

144+
if (!APR) {
145+
return null;
146+
}
147+
144148
return {
145149
incentiveAPR: (APR / 100).toString(),
146150
rewardTokenAddress: incentive.rewardTokenAddress,

0 commit comments

Comments
 (0)