Skip to content

Commit 84dc431

Browse files
committed
fix: restore missing page components and placeholder assets for CI build
1 parent dd9c49c commit 84dc431

5 files changed

Lines changed: 465 additions & 931 deletions

File tree

Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import BalanceCards from '@/components/ui/balance-cards/BalanceCards';
2+
import { Button } from '@/components/ui/custom-button/Button';
3+
import useWithdrawAll from '@/hooks/useWithdrawAll';
4+
import { useWalletStore } from '@/stores/useWalletStore';
5+
import DashboardLayout from '@/pages/DashboardLayout.jsx';
6+
7+
const WithdrawAll = () => {
8+
const { walletId } = useWalletStore();
9+
const { withdrawAll, isLoading } = useWithdrawAll();
10+
11+
const handleWithdrawAll = () => {
12+
withdrawAll(walletId);
13+
};
14+
15+
return (
16+
<DashboardLayout title="Withdraw All">
17+
<div className="flex w-full flex-col items-center px-4 sm:px-6 lg:px-8">
18+
<div className="w-full overflow-x-auto overflow-y-hidden [-ms-overflow-style:none] [scrollbar-width:none]">
19+
<BalanceCards className="balance-card-withdraw !w-full whitespace-nowrap" />
20+
</div>
21+
<div className="flex flex-col gap-20 md:gap-10">
22+
<div className="mt-8 text-center">
23+
<h1 className="text-lg font-medium text-gray-200 mb-4">Please take special note</h1>
24+
</div>
25+
26+
<div className="bg-warning-alt text-secondary border-warning mt-6 mb-6 w-full rounded-lg border px-6 py-4 text-center md:max-w-[650px]">
27+
Clicking on the <strong>Withdraw All</strong> button means you are agreeing to close all positions and get
28+
all tokens transferred to your wallet.
29+
</div>
30+
31+
<Button
32+
variant="primary"
33+
className="!w-full py-3 text-lg md:max-w-[650px]"
34+
size="lg"
35+
type="button"
36+
onClick={handleWithdrawAll}
37+
disabled={isLoading}
38+
>
39+
{isLoading ? 'Processing...' : 'Withdraw All'}
40+
</Button>
41+
</div>
42+
</div>
43+
</DashboardLayout>
44+
);
45+
};
46+
47+
export default WithdrawAll;
48+
49+
// overflow-x-auto overflow-y-hidden [scrollbar-width:none] [-ms-overflow-style:none]
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import React, { useEffect } from 'react';
2+
import ScrollButton from '@/components/ui/scroll-button/ScrollButton';
3+
import Sections from '@/components/layout/sections/Sections';
4+
import Sidebar from '@/components/layout/sidebar/Sidebar';
5+
6+
export const DefiSpringPage = () => {
7+
useEffect(() => {
8+
window.scrollTo(0, 0);
9+
}, []);
10+
11+
const tableOfContents = [
12+
{ id: 'Introduction', name: 'Introduction', link: '#introduction' },
13+
{
14+
id: 'overview',
15+
name: 'Program overview',
16+
link: '#overview',
17+
},
18+
{ id: 'claiming-rewards', name: 'Claiming rewards', link: '#claiming-rewards' },
19+
{ id: 'important-notes', name: 'Important notes', link: '#important-notes' },
20+
{ id: 'maximize-your-profit', name: 'Maximize your profit', link: '#maximize-your-profit' },
21+
{ id: 'hub-2', name: 'The Hub And Zones', link: '#hub-2' },
22+
{ id: 'hub-3', name: 'The Hub And Zones', link: '#hub-3' },
23+
{ id: 'hub-4', name: 'The Hub And Zones', link: '#hub-4' },
24+
{ id: 'hub-5', name: 'The Hub And Zones', link: '#hub-5' },
25+
];
26+
27+
const sectionsData = [
28+
{
29+
id: 'introduction',
30+
title: 'Introduction',
31+
content: [
32+
{
33+
type: 'text',
34+
value:
35+
'Welcome to the DeFi Spring Program!\nWhere you can earn rewards through the protocol. As part of this initiative, participants will have the opportunity to receive STRK token rewards for engaging with the platform. Here’s everything you need to know to get started and make the most of your participation.',
36+
},
37+
],
38+
},
39+
{
40+
id: 'overview',
41+
title: 'Program Overview',
42+
content: [
43+
{
44+
type: 'list',
45+
items: [
46+
'Start Date: March 14, 2024, at 00:00 UTC.',
47+
'Duration: 6-8 months.',
48+
'Eligibility: Open to everyone!.',
49+
'Reward APR: The approximate $STRK rewards APR will be displayed next to eligible supply and borrow pools, in addition to the base interest rate.',
50+
],
51+
},
52+
],
53+
},
54+
{
55+
id: 'claiming-rewards',
56+
title: 'Claiming rewards',
57+
content: [
58+
{
59+
type: 'list',
60+
items: [
61+
'Reward Phases: Rewards are earned in phases, each lasting from Thursday to Wednesday. After each phase ends, it will take about 1 day for the rewards to be claimable.',
62+
'Reward Claims: Rewards can be claimed via the protocol rewards system.',
63+
'Accrued Rewards: The total rewards earned will be visible at the end of the program. You can claim your rewards all at once at that time.',
64+
'Final Claim Deadline: Be sure to claim your rewards before the DeFi Spring program ends. Any unclaimed rewards will be returned to the program treasury.',
65+
],
66+
},
67+
],
68+
},
69+
70+
{
71+
id: 'important-notes',
72+
title: 'Important notes',
73+
content: [
74+
{
75+
type: 'list',
76+
items: [
77+
'Dynamic APRs: The APRs (Annual Percentage Rates) are updated daily based on market conditions and pool sizes. These rates may change throughout the program.',
78+
'Incentive Strategy: Different actions, such as depositing or borrowing, may receive varying rewards depending on market dynamics',
79+
'Recursive Borrow Adjustment: Rewards are based on your net deposit after accounting for borrowed funds. For example, if you deposit 100 ETH and borrow 50 ETH, your net deposit is considered 50 ETH. Recursive borrowers will see a higher APR than what they ultimately claim.',
80+
'Stablecoin Considerations: From Phase 3 onward, stablecoins (USDC, USDT, DAI) will be treated as the same asset for reward calculations. Your eligible net deposit for these will be calculated as the value of stablecoins deposited minus the value of stablecoins borrowed.',
81+
],
82+
},
83+
],
84+
},
85+
86+
{
87+
id: 'maximize-your-profit',
88+
title: 'Maximize your profit',
89+
content: [
90+
{
91+
type: 'text',
92+
value:
93+
'By participating in the DeFi Spring program, you can leverage your assets and earn additional rewards, contributing to a more liquid and dynamic DeFi ecosystem. Keep an eye on your rewards as you participate, and make the most out of the program!',
94+
},
95+
],
96+
},
97+
];
98+
99+
return (
100+
<div className="relative flex min-h-screen flex-row pt-1">
101+
<div className="lg:w-[375px]">
102+
<Sidebar title="Content" items={tableOfContents} />
103+
</div>
104+
105+
<div className="relative ml-4 min-h-screen flex-1 px-7 py-6 md:px-4 md:py-12">
106+
<h1 className="mt-16 mb-8 text-3xl font-bold text-white">DeFi Spring Documentation</h1>
107+
<div className="ml-8">
108+
<Sections sections={sectionsData} />
109+
</div>
110+
</div>
111+
112+
<ScrollButton />
113+
</div>
114+
);
115+
};

0 commit comments

Comments
 (0)