push-protocol / push-dapp

The Push Protocol Dapp
https://app.push.org
Other
42 stars 36 forks source link

Activities tab UI - Rewards page #1651

Closed corlard3y closed 2 weeks ago

corlard3y commented 2 weeks ago

Pull Request Template

1649

Description

Rewards activities UI page implementation in the new Rewards feature.

Type of Change

Checklist

Frontend Guidelines

Build & Testing

Screenshots/Video with Explanation

Additional Context

https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations-%5BFuture%5D?node-id=3120-35384&t=VgrToosyrSqCX9mw-0

Review & Approvals

Notes

github-actions[bot] commented 2 weeks ago

It looks like there is an issue in the code structure. The RewardActivities component is defined twice in the same file. The second RewardActivities component definition should be removed as it is a duplicate.

Here is the updated code snippet:

import { RewardsTabsList } from './Rewards.types';

export const rewardsTabsList: RewardsTabsList = [
  {
    value: 'dashboard',
    label: 'Dashboard',
  },
  {
    value: 'activities',
    label: 'Reward Activities',
  },
  {
    value: 'leaderboard',
    label: 'Leaderboard',
  },
];

import React, { FC } from 'react';
import { css } from 'styled-components';
import { Box, Button, Text } from 'blocks';
import { RewardActivitiesProps } from './RewardActivities';

const RewardActivities: FC<RewardActivitiesProps> = ({ onGetStarted }) => {
  const rewardsArray = [
    {
      title: 'Follow @PushProtocol on X',
      points: 10000,
      buttonText: 'Follow'
    },
    // Additional reward activities data
  ];

  return (
    // RewardActivities component JSX
  );
};

export { RewardActivities };

import { Box } from 'blocks';
import { FC } from 'react';
import { RewardsTabs } from './RewardsTabs';
import { RewardsTabs as RewardsTabsType } from '../Rewards.types';
import { DashboardSection } from './DashboardSection';
import { RewardActivities } from './RewardActivities';

export type RewardsTabsContainerProps = {
  activeTab: RewardsTabsType;
  handleSetActiveTab: (tab: RewardsTabsType) => void;
};

const RewardsTabsContainer: FC<RewardsTabsContainerProps> = ({ activeTab, handleSetActiveTab }) => {
  return (
    // RewardsTabsContainer component JSX
  );
};

export { RewardsTabsContainer };

Please ensure to remove the duplicate definition of the RewardActivities component so that the code remains clean and error-free.

All looks good.

github-actions[bot] commented 2 weeks ago

All looks good.

github-actions[bot] commented 2 weeks ago

All looks good.

github-actions[bot] commented 2 weeks ago

All looks good.

github-actions[bot] commented 2 weeks ago

All looks good.