Skip to content

Commit

Permalink
Rewards V2 (#1772)
Browse files Browse the repository at this point in the history
* added loading colour

* add icon

* add components

* update styles

* update mobile view

* update titles

* change button labels

* update multiplier

* update useDailyRewards hook

* update unlock profile modal changes

* update usedailyrewards hook

* fix isLoading onclick

* update locked status/ rewards ui

* update new users status

* add skeleton loader

* comment out stake push activities

* update skeleton loader

* update locked icon

* format text

* feat: add alert ds component (#1781)

* feat: add alert ds component

* chore: update alert ds acc to review

* chore: update component acc to review

* update alert for error messages

* update indexes

* Update Dashboard.tsx

* remove unusued

* fixed review comments

* Update Button.tsx

* update completed state

* fixed the spinner and button

* fixed the spinner and button

* Added spinner component (#1783)

* added spinner component

* added review changes

* added correct variants

* added the review comments

* added the review comments

* Add progress bar to ds (#1787)

* feat: add progress bar to ds

* chore: update progress bar according to review

* add loading state

* update locked status

* update isLocked

* update loading state

* remove disabled state from button

* update locked divider

* update error message

* fix icons and illustrations

* update naming and imports

* update reward activites hook

* update type

* add types

* resolve conments

* update box

* update text changes

* update text

* update points real time

* update mutiplier conditions in bonus

* update gap

* update padding referal section

* adjust daily section ui

* update stake array

* update stake api

* update rewards verification hook

* fix: yield farming layouts and resize buttons to take full width (#1793)

* Add support for erc1155 (#1794)

* chore: add support for erc1155

* chore: update uiweb version to include erc1155 support

* Replaced older tab implementation in trending channels with the new tab block component (#1800)

* added

* moved function to utils

* tab changes

* reverted rewards tab change

* Update Dashboard.utils.ts

* Opt-In Dropdown for dashboard (#1802)

* Opt-In Dropdown for dashboard

* Fixed the comments and issues

* Fixed the context issue

* DS-Dapp Notification Component  (#1801)

* add in-app semantics and block files

* update notification component

* add localstorage identifier

* update library

* add duration option

* resolve comments

* update comment fixes

* fix comments

* testing notification

* update notification component

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>

* DApp-1804 tag component added in blocks (#1805)

* tag in progress

* implemented tag component

* Tag component implemented in blocks

* update hook and export component

* update code

* add componentdid mount flow

* update mount logic

* fix stake font size

* fix conflicts

* Fixed create channel ui , fixed message for unlock profile, removed governance from sidebar (#1817)

* fixed minor ui issues

* fixed minor ui issues

* fixed minor ui issues

* fixed select text color

* fixed select text color

* fixed select text color

* fixed chain issue

* fixed send notif delegate issue (#1822)

* fixed send notif delegate issue

* Fixed the send notification button on the navigation for delegatee list

* added fixes for alias

* added fixes for alias

* fixed review comment

---------

Co-authored-by: abhishek-01k <[email protected]>

* DApp-1799 blocks/table (#1824)

* table in progress

* in progress

* in progress

* table complete

* fixed header route +  reverted changes

* added alignment support

* set debug to false

* fix comments

* export type and fix issues

* update rewards notification

* fix loading state

* add activit days

* update locked status

* updates test whitelist file for nft claims

* fixed smart contract for alpha nft

* update reset time

* refactor code

* update fixes

* stake push

* update types

* update yarn.lock

* update icons

* update icons batch 2

* sort stake section

* add local storage key

* update hasEnded and has text

* fixed channel notifications (#1852)

* added the new monotone icons (#1857)

* added support for icons in tag components (#1853)

* update stat in yield farming data store (#1859)

* update refetch leaderboard

* fix double text issue - media query

* update icon

* hide notifs

* update font sizes

* fix invalid verification proof issue

* remove console

* update success flow

* fixes done

* removed the png file

* lock file fixed

* remove isActive Account in auth hook

---------

Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: rohitmalhotra1420 <[email protected]>
Co-authored-by: Kalash Shah <[email protected]>
Co-authored-by: Monalisha Mishra <[email protected]>
Co-authored-by: Abhishek <[email protected]>
Co-authored-by: abhishek-01k <[email protected]>
  • Loading branch information
7 people authored Sep 30, 2024
1 parent 49879eb commit 652e7f8
Show file tree
Hide file tree
Showing 110 changed files with 7,304 additions and 1,358 deletions.
14 changes: 6 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// React + Web3 Essentials
import { FC, useContext, useEffect, useMemo, useRef, useState } from 'react';
import { FC, useContext, useEffect, useMemo, useState } from 'react';

// External Packages
import * as dotenv from 'dotenv';
Expand All @@ -11,7 +11,6 @@ import styled, { ThemeProvider } from 'styled-components';

import { ChatUIProvider, darkChatTheme, IChatTheme } from '@pushprotocol/uiweb';
import { createGlobalStyle } from 'styled-components';
import { Toaster } from 'sonner';

// Internal Compoonents
import InitState from 'components/InitState';
Expand Down Expand Up @@ -51,8 +50,9 @@ import { darkTheme, lightTheme } from 'config/spaceTheme';
import SpaceComponentContextProvider from 'contexts/SpaceComponentsContext';
import SpaceContextProvider from 'contexts/SpaceContext';
import { SpaceWidgetSection } from 'sections/space/SpaceWidgetSection';
import { blocksColors, getBlocksCSSVariables } from 'blocks';
import { blocksColors, getBlocksCSSVariables, Notification } from 'blocks';
import APP_PATHS from 'config/AppPaths';
import { useRewardsNotification } from 'common';

dotenv.config();

Expand Down Expand Up @@ -193,6 +193,8 @@ export default function App() {
const dispatch = useDispatch();

const { isActive, account, provider } = useAccount();
// TODO: comment until rewards v2 launch is accounced
// useRewardsNotification();
const [currentTime, setcurrentTime] = useState(0);

const { pgpPvtKey } = useContext<any>(AppContext);
Expand Down Expand Up @@ -347,11 +349,7 @@ export default function App() {
<>
<GlobalStyle />
<InitState />
<Toaster
style={{ minWidth: '397px', height: '111px' }}
offset={15}
visibleToasts={5}
/>
<Notification />
<NavigationContextProvider>
<ChatUIProvider
user={userPushSDKInstance}
Expand Down
59 changes: 59 additions & 0 deletions src/blocks/icons/components/Clockwise.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { FC } from 'react';
import { IconWrapper } from '../IconWrapper';
import { IconProps } from '../Icons.types';

const Clockwise: FC<IconProps> = (allProps) => {
const { svgProps: props, ...restProps } = allProps;
return (
<IconWrapper
componentName="Clockwise"
icon={
<svg
xmlns="http://www.w3.org/2000/svg"
width="inherit"
height="inherit"
viewBox="0 0 25 24"
fill="none"
{...props}
>
<g clip-path="url(#clip0_5344_11356)">
<path
d="M12.1157 7.5V12L15.8657 14.25"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M17.3657 9.75H21.1157V6"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M17.7782 18C16.5989 19.1128 15.1177 19.8535 13.5199 20.1294C11.922 20.4052 10.2783 20.2041 8.79405 19.5512C7.30983 18.8982 6.05093 17.8224 5.17465 16.458C4.29837 15.0937 3.84357 13.5014 3.86708 11.88C3.89058 10.2587 4.39135 8.68026 5.30681 7.3419C6.22227 6.00354 7.51183 4.96462 9.01435 4.35497C10.5169 3.74531 12.1658 3.59194 13.7549 3.91403C15.3441 4.23612 16.8032 5.01937 17.9498 6.16593C19.0532 7.28343 19.9645 8.33718 21.1157 9.75"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</g>
<defs>
<clipPath id="clip0_5344_11356">
<rect
width="24"
height="24"
fill="white"
transform="translate(0.115723)"
/>
</clipPath>
</defs>
</svg>
}
{...restProps}
/>
);
};

export default Clockwise;
42 changes: 42 additions & 0 deletions src/blocks/icons/components/Lock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { FC } from 'react';
import { IconWrapper } from '../IconWrapper';
import { IconProps } from '../Icons.types';

const Lock: FC<IconProps> = (allProps) => {
const { svgProps: props, ...restProps } = allProps;
return (
<IconWrapper
componentName="Lock"
icon={
<svg
xmlns="http://www.w3.org/2000/svg"
width="inherit"
height="inherit"
viewBox="0 0 29 28"
fill="none"
{...props}
>
<g clip-path="url(#clip0_5205_40502)">
<path
d="M21.8657 8.75H19.3657V6.125C19.3657 4.73261 18.8126 3.39726 17.828 2.41269C16.8435 1.42812 15.5081 0.875 14.1157 0.875C12.7233 0.875 11.388 1.42812 10.4034 2.41269C9.41885 3.39726 8.86572 4.73261 8.86572 6.125V8.75H6.36572C5.90159 8.75 5.45647 8.93437 5.12829 9.26256C4.8001 9.59075 4.61572 10.0359 4.61572 10.5V22.75C4.61572 23.2141 4.8001 23.6592 5.12829 23.9874C5.45647 24.3156 5.90159 24.5 6.36572 24.5H21.8657C22.3299 24.5 22.775 24.3156 23.1032 23.9874C23.4313 23.6592 23.6157 23.2141 23.6157 22.75V10.5C23.6157 10.0359 23.4313 9.59075 23.1032 9.26256C22.775 8.93437 22.3299 8.75 21.8657 8.75ZM14.1157 17.9375C13.8561 17.9375 13.6024 17.8605 13.3865 17.7163C13.1707 17.5721 13.0025 17.3671 12.9031 17.1273C12.8038 16.8874 12.7778 16.6235 12.8284 16.3689C12.8791 16.1143 13.0041 15.8805 13.1876 15.6969C13.3712 15.5134 13.6051 15.3884 13.8597 15.3377C14.1143 15.2871 14.3782 15.3131 14.618 15.4124C14.8578 15.5117 15.0628 15.68 15.207 15.8958C15.3512 16.1117 15.4282 16.3654 15.4282 16.625C15.4282 16.9731 15.2899 17.3069 15.0438 17.5531C14.7977 17.7992 14.4638 17.9375 14.1157 17.9375ZM17.6157 8.75H10.6157V6.125C10.6157 5.19674 10.9845 4.3065 11.6408 3.65013C12.2972 2.99375 13.1875 2.625 14.1157 2.625C15.044 2.625 15.9342 2.99375 16.5906 3.65013C17.247 4.3065 17.6157 5.19674 17.6157 6.125V8.75Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_5205_40502">
<rect
width="28"
height="28"
fill="white"
transform="translate(0.115723)"
/>
</clipPath>
</defs>
</svg>
}
{...restProps}
/>
);
};

export default Lock;
30 changes: 30 additions & 0 deletions src/blocks/icons/components/Stopwatch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { FC } from 'react';
import { IconWrapper } from '../IconWrapper';
import { IconProps } from '../Icons.types';

const Stopwatch: FC<IconProps> = (allProps) => {
const { svgProps: props, ...restProps } = allProps;
return (
<IconWrapper
componentName="Stopwatch"
icon={
<svg
xmlns="http://www.w3.org/2000/svg"
width="inherit"
height="inherit"
viewBox="0 0 9 10"
fill="none"
{...props}
>
<path
d="M4.28572 1.42857C3.43808 1.42857 2.60948 1.67992 1.9047 2.15084C1.19992 2.62176 0.650608 3.2911 0.326232 4.07421C0.00185694 4.85733 -0.0830145 5.71904 0.0823507 6.55039C0.247716 7.38173 0.655891 8.14537 1.25526 8.74474C1.85463 9.34411 2.61827 9.75228 3.44961 9.91765C4.28096 10.083 5.14268 9.99814 5.92579 9.67377C6.7089 9.34939 7.37824 8.80008 7.84916 8.0953C8.32008 7.39052 8.57143 6.56192 8.57143 5.71428C8.57013 4.57804 8.11818 3.48871 7.31474 2.68526C6.51129 1.88182 5.42196 1.42987 4.28572 1.42857ZM6.32411 4.18125L4.53839 5.96696C4.50521 6.00015 4.46582 6.02647 4.42246 6.04443C4.37911 6.06238 4.33264 6.07163 4.28572 6.07163C4.23879 6.07163 4.19232 6.06238 4.14897 6.04443C4.10561 6.02647 4.06622 6.00015 4.03304 5.96696C3.99986 5.93378 3.97353 5.89439 3.95558 5.85103C3.93762 5.80768 3.92837 5.76121 3.92837 5.71428C3.92837 5.66736 3.93762 5.62089 3.95558 5.57754C3.97353 5.53418 3.99986 5.49479 4.03304 5.46161L5.81875 3.67589C5.85193 3.64271 5.89133 3.61639 5.93468 3.59843C5.97804 3.58047 6.0245 3.57123 6.07143 3.57123C6.11836 3.57123 6.16482 3.58047 6.20818 3.59843C6.25153 3.61639 6.29093 3.64271 6.32411 3.67589C6.35729 3.70907 6.38361 3.74847 6.40157 3.79182C6.41953 3.83518 6.42877 3.88164 6.42877 3.92857C6.42877 3.9755 6.41953 4.02197 6.40157 4.06532C6.38361 4.10867 6.35729 4.14807 6.32411 4.18125ZM2.85714 0.357143C2.85714 0.262423 2.89477 0.171582 2.96175 0.104605C3.02873 0.0376274 3.11957 0 3.21429 0H5.35714C5.45186 0 5.54271 0.0376274 5.60968 0.104605C5.67666 0.171582 5.71429 0.262423 5.71429 0.357143C5.71429 0.451863 5.67666 0.542704 5.60968 0.609681C5.54271 0.676658 5.45186 0.714286 5.35714 0.714286H3.21429C3.11957 0.714286 3.02873 0.676658 2.96175 0.609681C2.89477 0.542704 2.85714 0.451863 2.85714 0.357143Z"
fill="currentColor"
/>
</svg>
}
{...restProps}
/>
);
};

export default Stopwatch;
5 changes: 5 additions & 0 deletions src/blocks/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export { default as ChannelHomeFilled } from './components/ChannelHomeFilled';
export { default as Chat } from './components/Chat';
export { default as ChatFilled } from './components/ChatFilled';

export { default as Clockwise } from './components/Clockwise';
export { default as CircleFilled } from './components/CircleFilled';
export { default as CloudUpload } from './components/CloudUpload';

Expand Down Expand Up @@ -91,6 +92,8 @@ export { default as KebabMenuHorizontal } from './components/KebabMenuHorizontal

export { default as LightFilled } from './components/LightFilled';

export { default as Lock } from './components/Lock';

export { default as MaximizeRight } from './components/MaximizeRight';
export { default as MaximizeLeft } from './components/MaximizeLeft';

Expand Down Expand Up @@ -154,6 +157,8 @@ export { default as Star } from './components/Star';

export { default as Settings } from './components/Settings';

export { default as Stopwatch } from './components/Stopwatch';

export { default as Swap } from './components/Swap';

export { default as Tick } from './components/Tick';
Expand Down
60 changes: 60 additions & 0 deletions src/blocks/illustrations/components/ActivePushPoints.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { FC } from 'react';
import { IllustrationWrapper } from '../IllustrationWrapper';
import { IllustrationProps } from '../Illustrations.types';

const ActivePushPoints: FC<IllustrationProps> = (allProps) => {
const { svgProps: props, ...restProps } = allProps;
return (
<IllustrationWrapper
componentName="ActivePushPoints"
illustration={
<svg
xmlns="http://www.w3.org/2000/svg"
width={restProps?.width ?? '24'}
height={restProps?.height ?? '24'}
viewBox="0 0 48 48"
fill="none"
{...props}
>
<circle
cx="24"
cy="24"
r="24"
fill="#45C97C"
/>
<circle
cx="24"
cy="24"
r="20.874"
fill="#45C97C"
stroke="white"
stroke-width="2"
/>
<path
d="M12 20.4V33.6918C12 34.5672 13.0453 35.0201 13.6839 34.4213L18.2076 30.1803C18.3312 30.0645 18.4943 30 18.6637 30H27C31.9706 30 36 25.9706 36 21C36 16.0294 31.9706 12 27 12H20.4C15.7608 12 12 15.7608 12 20.4Z"
fill="white"
/>
<rect
x="20.7144"
y="24"
width="18.416"
height="12.4739"
rx="6.23697"
fill="#E251F9"
/>
<path
d="M35.4032 31.4347C35.4032 32.796 34.4508 33.8158 32.8682 33.8158C31.2327 33.8158 30.1216 32.8105 30.1216 30.415C30.1216 27.7694 31.2424 26.6582 32.8971 26.6582C34.4893 26.6582 35.1098 27.6491 35.2108 28.4717V28.616H34.167C34.1044 28.0435 33.7581 27.524 32.9067 27.524C31.9783 27.524 31.2664 28.1542 31.2568 30.0494H31.3482C31.5743 29.6261 32.0841 29.1547 33.0799 29.1547C34.4315 29.1547 35.4032 30.0686 35.4032 31.4347ZM34.2872 31.4877C34.2872 30.6026 33.71 30.0205 32.8538 30.0205C31.9976 30.0205 31.4107 30.6026 31.4107 31.4877C31.4107 32.3679 31.9976 32.95 32.8538 32.95C33.71 32.95 34.2872 32.3679 34.2872 31.4877Z"
fill="white"
/>
<path
d="M26.3222 32.6084V30.641H24.4414V29.8185H26.3222V27.8511H27.2361V29.8185H29.1169V30.641H27.2361V32.6084H26.3222Z"
fill="white"
/>
</svg>
}
{...restProps}
/>
);
};

export default ActivePushPoints;
Loading

0 comments on commit 652e7f8

Please sign in to comment.