Skip to content

Commit

Permalink
improve: skeleton pass
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris committed Nov 8, 2023
1 parent 3ec52ce commit 9448f2f
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 595 deletions.
25 changes: 25 additions & 0 deletions src/assets/icons/lp-lg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/assets/icons/reward-lg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 4 additions & 42 deletions src/views/Rewards/Rewards.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import BreadcrumbV2 from "components/BreadcrumbV2";
import ConnectedReferralBox from "./components/ConnectedReferralBox";
import DisconnectedReferralBox from "./components/DisconnectedReferralBox";
import OverviewRewardSection from "./components/OverviewRewardSection";
import SectionWrapper from "../../components/SectionTitleWrapperV2/SectionWrapperV2";
import { useRewards } from "./hooks/useRewards";
import { InnerSectionWrapper, Wrapper } from "./Rewards.style";
Expand All @@ -10,28 +7,11 @@ import { LayoutV2 } from "components";
import useScrollElementByHashIntoView from "hooks/useScrollElementByHashIntoView";
import AdditionalQuestionCTA from "./components/AdditionalQuestionCTA";
import OverviewSection from "./components/OverviewSection";
import RewardProgramSection from "./components/RewardProgramSection";

const Rewards = () => {
const {
isConnected,
connectHandler,
address,
totalRewards,
stakedTokens,

referralTier,
referralRate,
referralRewards,
referralTransfers,
referralVolume,
referralWallets,

areStakingPoolsLoading,
myPoolData,
allPoolData,

formatterFn,
} = useRewards();
const { isConnected, areStakingPoolsLoading, myPoolData, allPoolData } =
useRewards();

useScrollElementByHashIntoView();

Expand All @@ -41,23 +21,6 @@ const Rewards = () => {
<BreadcrumbV2 />
<InnerSectionWrapper>
<OverviewSection />
<SectionWrapper
title="Referrals"
link={{ name: "View all data", href: "/rewards/referrals" }}
>
{isConnected && address ? (
<ConnectedReferralBox
walletCount={referralWallets}
transferCount={referralTransfers}
volume={referralVolume}
formatter={formatterFn}
referralRate={referralRate}
rewards={referralRewards}
/>
) : (
<DisconnectedReferralBox connectHandler={connectHandler} />
)}
</SectionWrapper>
{isConnected && (areStakingPoolsLoading || myPoolData.length > 0) && (
<SectionWrapper title="My pools" id="my-pools">
<GenericStakingPoolTable
Expand All @@ -66,7 +29,6 @@ const Rewards = () => {
/>
</SectionWrapper>
)}

{(areStakingPoolsLoading || allPoolData.length > 0) && (
<SectionWrapper title="All pools">
<GenericStakingPoolTable
Expand All @@ -75,7 +37,7 @@ const Rewards = () => {
/>
</SectionWrapper>
)}

<RewardProgramSection />
<AdditionalQuestionCTA />
</InnerSectionWrapper>
</Wrapper>
Expand Down
217 changes: 0 additions & 217 deletions src/views/Rewards/components/ConnectedReferralBox.tsx

This file was deleted.

Loading

0 comments on commit 9448f2f

Please sign in to comment.