Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yield farming layouts and resize buttons to take full width #1793

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/yield/YieldPushFeeV3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ const YieldPushFeeV3 = ({ userDataPush, getUserDataPush, PUSHPoolstats, getPUSHP
<Button
variant="primary"
size="medium"
block
onClick={showStakingModal}
>
Stake $PUSH
Expand All @@ -722,6 +723,7 @@ const YieldPushFeeV3 = ({ userDataPush, getUserDataPush, PUSHPoolstats, getPUSHP
<Button
variant="outline"
size="medium"
block
onClick={unstakeTokensPaginated}
>
{txInProgressWithdraw ? (
Expand All @@ -748,6 +750,7 @@ const YieldPushFeeV3 = ({ userDataPush, getUserDataPush, PUSHPoolstats, getPUSHP
>
<Button
size="medium"
block
disabled={true}
>
{txInProgressClaimRewards ? (
Expand All @@ -765,6 +768,7 @@ const YieldPushFeeV3 = ({ userDataPush, getUserDataPush, PUSHPoolstats, getPUSHP
<Button
variant="outline"
size="medium"
block
onClick={claimRewards}
>
{txInProgressClaimRewards ? (
Expand Down Expand Up @@ -1003,6 +1007,7 @@ const ButtonsContainer = styled.div`
display: flex;
margin: 15px 0px 0px 0px;
gap: var(--s3);
width: 100%;
`;

const SkeletonContainer = styled(Skeleton)`
Expand Down
6 changes: 6 additions & 0 deletions src/components/yield/YieldUniswapV3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ const YieldUniswapV3 = ({ lpPoolStats, userDataLP, getLpPoolStats, getUserDataLP
<Button
variant="primary"
size="medium"
block
onClick={() => {
handleStakingModal();
}}
Expand All @@ -580,6 +581,7 @@ const YieldUniswapV3 = ({ lpPoolStats, userDataLP, getLpPoolStats, getUserDataLP
<Button
disabled={true}
size="medium"
block
>
{txInProgressWithdraw ? (
<LoaderSpinner
Expand All @@ -596,6 +598,7 @@ const YieldUniswapV3 = ({ lpPoolStats, userDataLP, getLpPoolStats, getUserDataLP
<Button
size="medium"
variant="outline"
block
onClick={withdrawAmountTokenFarmAutomatic}
>
{txInProgressWithdraw ? (
Expand Down Expand Up @@ -623,6 +626,7 @@ const YieldUniswapV3 = ({ lpPoolStats, userDataLP, getLpPoolStats, getUserDataLP
<Button
disabled={true}
size="medium"
block
>
{txInProgressClaimRewards ? (
<LoaderSpinner
Expand All @@ -639,6 +643,7 @@ const YieldUniswapV3 = ({ lpPoolStats, userDataLP, getLpPoolStats, getUserDataLP
<Button
variant="outline"
size="medium"
block
onClick={() => massClaimRewardsTokensAll()}
>
{txInProgressClaimRewards ? (
Expand Down Expand Up @@ -786,6 +791,7 @@ const ButtonsContainer = styled.div`
display: flex;
gap: var(--spacing-xxxs, 4px);
margin: 15px 0px 0px 0px;
width: 100%;
`;

const SkeletonContainer = styled(Skeleton)`
Expand Down
23 changes: 3 additions & 20 deletions src/pages/YieldFarmingPageV2.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
// React + Web3 Essentials
import React from 'react';

// External Packages
import styled, { useTheme } from 'styled-components';

// Internal Components
import { SectionV2 } from 'components/reusables/SharedStylingV2';
import YieldFarmingModuleV2 from 'modules/yield/YieldFarmingModuleV2';

// Internal Configs
import GLOBALS from 'config/Globals';
import { ContentLayout } from 'common';

// Chat page
const YieldFarmingPageV2 = () => {
// RENDER
return (
<Container>
<ContentLayout>
<YieldFarmingModuleV2 />
</Container>
</ContentLayout>
);
};
export default YieldFarmingPageV2;

// This defines the page settings, toggle align-self to center if not covering entire stuff, align-items to place them at center
// justify content flex start to start from top, height is defined by module as well as amount of margin, padding
const Container = styled(SectionV2)`
flex: 1;
flex-direction: column;
align-self: stretch;
`;
Loading