Skip to content

Commit

Permalink
chore(incentives): Update notification for incentives season 4 (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosepuppy authored Apr 9, 2024
1 parent a73f361 commit 80283f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/constants/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export type TransferNotifcation = {
};

export enum ReleaseUpdateNotificationIds {
IncentivesS3 = 'incentives-s3',
IncentivesS4 = 'incentives-s4',
IncentivesDistributedS2 = 'incentives-distributed-s2',
}

Expand Down
16 changes: 8 additions & 8 deletions src/hooks/useNotificationTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,27 @@ export const notificationTypes: NotificationTypeConfig[] = [
useTrigger: ({ trigger }) => {
const { chainTokenLabel } = useTokenConfigs();
const stringGetter = useStringGetter();
const expirationDate = new Date('2024-03-08T23:59:59');
const expirationDate = new Date('2024-05-09T23:59:59');
const currentDate = new Date();

useEffect(() => {
if (currentDate <= expirationDate) {
trigger(
ReleaseUpdateNotificationIds.IncentivesS3,
ReleaseUpdateNotificationIds.IncentivesS4,
{
icon: <AssetIcon symbol={chainTokenLabel} />,
title: stringGetter({ key: 'NOTIFICATIONS.INCENTIVES_SEASON_BEGUN.TITLE' }),
body: stringGetter({
key: 'NOTIFICATIONS.INCENTIVES_SEASON_BEGUN.BODY',
params: {
SEASON_NUMBER: '3',
PREV_SEASON_NUMBER: '1',
DYDX_AMOUNT: '34',
USDC_AMOUNT: '100',
SEASON_NUMBER: '4',
PREV_SEASON_NUMBER: '2',
DYDX_AMOUNT: '16',
USDC_AMOUNT: '50',
},
}),
toastSensitivity: 'foreground',
groupKey: ReleaseUpdateNotificationIds.IncentivesS3,
groupKey: ReleaseUpdateNotificationIds.IncentivesS4,
},
[]
);
Expand Down Expand Up @@ -312,7 +312,7 @@ export const notificationTypes: NotificationTypeConfig[] = [
const navigate = useNavigate();

return (notificationId: string) => {
if (notificationId === ReleaseUpdateNotificationIds.IncentivesS3) {
if (notificationId === ReleaseUpdateNotificationIds.IncentivesS4) {
navigate(`${chainTokenLabel}/${TokenRoute.TradingRewards}`);
} else if (notificationId === ReleaseUpdateNotificationIds.IncentivesDistributedS2) {
navigate(`${chainTokenLabel}/${TokenRoute.StakingRewards}`);
Expand Down

0 comments on commit 80283f7

Please sign in to comment.