Skip to content

Commit

Permalink
chore: refactor/centralized incentives files/components
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinGbz committed Mar 6, 2025
1 parent b96fb73 commit 3972da6
Show file tree
Hide file tree
Showing 13 changed files with 218 additions and 299 deletions.
29 changes: 0 additions & 29 deletions src/components/incentives/EthenaIncentivesTooltipContent.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions src/components/incentives/EtherfiIncentivesTooltipContent.tsx

This file was deleted.

16 changes: 10 additions & 6 deletions src/components/incentives/IncentivesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ import { useRootStore } from 'src/store/root';
import { DASHBOARD } from 'src/utils/mixPanelEvents';

import { ContentWithTooltip } from '../ContentWithTooltip';
import { KernelAirdropTooltip } from '../infoTooltips/KernelAirdropTooltip';
import { SpkAirdropTooltip } from '../infoTooltips/SpkAirdropTooltip';
import { SuperFestTooltip } from '../infoTooltips/SuperFestTooltip';
import { FormattedNumber } from '../primitives/FormattedNumber';
import { TokenIcon } from '../primitives/TokenIcon';
import { EthenaAirdropTooltipContent } from './EthenaIncentivesTooltipContent';
import { EtherFiAirdropTooltipContent } from './EtherfiIncentivesTooltipContent';
import { getSymbolMap, IncentivesTooltipContent } from './IncentivesTooltipContent';
import { MeritIncentivesTooltipContent } from './MeritIncentivesTooltipContent';
import { SonicAirdropTooltipContent } from './SonicIncentivesTooltipContent';
import {
EthenaAirdropTooltipContent,
EtherFiAirdropTooltipContent,
SonicAirdropTooltipContent,
} from './PointsIncentivesTooltipContent';
import {
KernelAirdropTooltip,
SpkAirdropTooltip,
SuperFestTooltip,
} from './SimpleExternalIncentivesTooltip';
import { ZkSyncIgniteIncentivesTooltipContent } from './ZkSyncIgniteIncentivesTooltipContent';

interface IncentivesButtonProps {
Expand Down
80 changes: 80 additions & 0 deletions src/components/incentives/PointsIncentivesTooltipContent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { Trans } from '@lingui/macro';
import { Box } from '@mui/material';

import { Link } from '../primitives/Link';

export const EthenaAirdropTooltipContent = ({ points }: { points: number }) => {
return (
<Box>
<Trans>{`This asset is eligible for ${(<b>{points}x</b>)} Ethena Rewards.\n`}</Trans>
<br />
<Trans>{'Learn more about Ethena Rewards program'}</Trans>{' '}
<Link
href="https://app.ethena.fi/join"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
{'here'}
</Link>
{'.'}
<br />
<br />
<Trans>
{`Aave Labs does not
guarantee the program and accepts no liability.\n`}
</Trans>
</Box>
);
};

export const SonicAirdropTooltipContent = ({ points }: { points: number }) => {
return (
<Box>
<Trans>{`This asset is eligible for ${(<b>{points}x</b>)} Sonic Rewards.\n`}</Trans>
<br />
<Trans>{'Learn more about Sonic Rewards program'}</Trans>{' '}
<Link
href="https://blog.soniclabs.com/sonic-points-simplified-how-to-qualify-for-200-million-s-airdrop/"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
{'here'}
</Link>
{'.'}
<br />
<br />
<Trans>
{`Aave Labs does not
guarantee the program and accepts no liability.\n`}
</Trans>
</Box>
);
};

export const EtherFiAirdropTooltipContent = ({ multiplier }: { multiplier: number }) => {
return (
<Box>
<Trans>
{`This asset is eligible for the Ether.fi Loyalty program with a `}
<b>x{multiplier} multiplier</b>
{`.`}
</Trans>
<br />
<Trans>Learn more about the Ether.fi program</Trans>{' '}
<Link
href="https://etherfi.gitbook.io/etherfi/getting-started/loyalty-points"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
here
</Link>
.
<br />
<br />
<Trans>Aave Labs does not guarantee the program and accepts no liability.</Trans>
</Box>
);
};
111 changes: 111 additions & 0 deletions src/components/incentives/SimpleExternalIncentivesTooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { Trans } from '@lingui/macro';

import { Link } from '../primitives/Link';
import { TextWithTooltip } from '../TextWithTooltip';

export const SuperFestTooltip = () => {
return (
<TextWithTooltip
wrapperProps={{ alignSelf: 'center' }}
color="warning.main"
iconSize={20}
icon={<image href="/icons/other/superfest.svg" width={25} height={25} />}
>
<>
<Trans>
This asset is eligible for rewards through SuperFest. Aave Labs does not guarantee the
program and accepts no liability.
</Trans>{' '}
<Link
href="https://superfest.optimism.io"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
Learn more
</Link>{' '}
<Trans>about SuperFest.</Trans>
<br />
<br />
<Trans>Rewards can be claimed through</Trans>{' '}
<Link
href="https://jumper.exchange/superfest"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
jumper.exchange
</Link>
</>
</TextWithTooltip>
);
};

export const SpkAirdropTooltip = () => {
return (
<TextWithTooltip
wrapperProps={{ alignSelf: 'center' }}
color="warning.main"
iconSize={20}
icon={<image href="/icons/other/spark.svg" width={25} height={25} />}
>
<>
<Trans>
{`This asset is eligible for SPK incentive program. Aave Labs does not
guarantee the program and accepts no liability.\n`}
</Trans>
<br />
<br />
<Trans>{'Learn more about the SPK rewards'}</Trans>{' '}
<Link
href="https://forum.sky.money/t/spark-proposal-for-integrations-into-aave/25005"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
{'here'}
</Link>{' '}
<Trans>{'and about SPK program'}</Trans>{' '}
<Link
href="https://docs.spark.fi/rewards/spk-token#what-is-the-spk-pre-farming-airdrop"
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
{'here'}
</Link>
{'.'}
</>
</TextWithTooltip>
);
};

export const KernelAirdropTooltip = () => {
return (
<TextWithTooltip
wrapperProps={{ alignSelf: 'center' }}
color="warning.main"
iconSize={20}
icon={<image href="/icons/other/kernel.svg" width={25} height={25} />}
>
<>
<Trans>
{`This asset is eligible for Kernel points incentive program. Aave Labs does not
guarantee the program and accepts no liability.\n`}
</Trans>
<br />
<br />
<Trans>{'Learn more about the Kernel points distribution'}</Trans>{' '}
<Link
href="https://kerneldao.gitbook.io/kernel/getting-started/editor/kernel-points-guide "
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
>
{'here'}
</Link>
{'.'}
</>
</TextWithTooltip>
);
};
29 changes: 0 additions & 29 deletions src/components/incentives/SonicIncentivesTooltipContent.tsx

This file was deleted.

34 changes: 0 additions & 34 deletions src/components/infoTooltips/KernelAirdropTooltip.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions src/components/infoTooltips/SpkAirdropTooltip.tsx

This file was deleted.

Loading

0 comments on commit 3972da6

Please sign in to comment.