Skip to content

Commit

Permalink
DAPP-1967-bonus-activity-container-position-fix (#1968)
Browse files Browse the repository at this point in the history
* DAPP-1967-bonus-activity-container-position-fix

* DAPP-1967 added lozenge tags support in staking activities
  • Loading branch information
rohitmalhotra1420 authored Nov 12, 2024
1 parent 66344c3 commit f769f86
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
20 changes: 14 additions & 6 deletions src/modules/rewards/components/BonusActivitiesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useRewardsContext } from 'contexts/RewardsContext';
import { walletToCAIP10 } from 'helpers/w2w';

// components
import { Alert, Box, Text } from 'blocks';
import { Alert, Box, Lozenge, Star, Text } from 'blocks';
import { BonusActivitiesItem } from './BonusActivitiesItem';

export type BonusActivitiesSectionProps = {};
Expand Down Expand Up @@ -69,12 +69,20 @@ const BonusActivities: FC<BonusActivitiesSectionProps> = () => {
flexDirection="column"
gap="spacing-sm"
>
<Text
variant="h4-bold"
color="text-primary"
<Box
display="flex"
flexDirection="row"
gap="spacing-xs"
alignItems="center"
>
Bonus Activities
</Text>
<Text
variant="h4-bold"
color="text-primary"
>
Bonus Activities
</Text>
<Lozenge icon={<Star />}>NEW</Lozenge>
</Box>

{errorMessage && (
<Box width="-webkit-fill-available">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const RewardsActivitiesBottomSection: FC<RewardsActivitiesBottomSectionProps> =
<RewardsActivitiesSection />
</Box>

<BonusActivities />

<Box
backgroundColor="surface-primary"
borderRadius="radius-md"
Expand All @@ -50,14 +48,15 @@ const RewardsActivitiesBottomSection: FC<RewardsActivitiesBottomSectionProps> =
display="flex"
flexDirection="column"
padding={{ ml: 'spacing-sm', initial: 'spacing-md' }}
margin="spacing-none spacing-none spacing-md spacing-none"
>
<StakePushSection
lifeTime={true}
title="Stake Push to Earn Multipliers"
subtitle="Visit [app.push.org/yield](https://app.push.org/yield) and stake tokens in the Fee Pool or LP Pool to activate multipliers."
/>
</Box>

<BonusActivities />
</Box>
);
};
Expand Down
29 changes: 26 additions & 3 deletions src/modules/rewards/components/StakePushActivitiesListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Activity, StakeActivityResponse, UsersActivity } from 'queries';
import { useAccount } from 'hooks';

// components
import { Box, Button, Lock, Multiplier, RewardsBell, Skeleton, Text } from 'blocks';
import { Box, Button, Lock, Lozenge, Multiplier, RewardsBell, Skeleton, Star, Text } from 'blocks';
import { RewardsActivityIcon } from './RewardsActivityIcon';
import { ActivityButton } from './ActivityButton';

Expand Down Expand Up @@ -93,23 +93,46 @@ const StakePushActivitiesListItem: FC<StakeActivitiesItemProps> = ({
gap={{ ml: 'spacing-sm', initial: 'spacing-xxxs' }}
alignItems={{ ml: 'center' }}
>
<Box display={{ ml: 'block', initial: 'none' }}>
<Box
display={{ ml: 'flex', initial: 'none' }}
flexDirection="column"
alignItems="center"
>
<Text
color="text-primary"
variant="h6-bold"
textAlign="center"
>
{activity?.activityTitle}
</Text>
{activity?.tags?.map((tag) => (
<Lozenge
size="small"
icon={<Star />}
>
{tag}
</Lozenge>
))}
</Box>
<Box display={{ ml: 'none', initial: 'block' }}>
<Box
display={{ ml: 'none', initial: 'flex' }}
gap="spacing-xs"
>
<Text
color="text-primary"
variant="bl-semibold"
textAlign="center"
>
{activity?.activityTitle}
</Text>
{activity?.tags?.map((tag) => (
<Lozenge
size="small"
icon={<Star />}
>
{tag}
</Lozenge>
))}
</Box>

{activity.points > 0 && (
Expand Down

0 comments on commit f769f86

Please sign in to comment.