diff --git a/src/pages/Rewards/index.tsx b/src/pages/Rewards/index.tsx index 0057ded9..92a692aa 100644 --- a/src/pages/Rewards/index.tsx +++ b/src/pages/Rewards/index.tsx @@ -41,6 +41,7 @@ const LiquidityWrapperCard = styled(DataCard)` overflow: hidden; border: none; border-radius: 8px; + padding: 18px 0 18px 18px; border: 1px solid rgba(160, 160, 160, 0.4); background: rgba(255, 255, 255, 0.05); ` @@ -344,6 +345,76 @@ export const LoadingRows = styled.div` } ` +const Container = styled.div` + display: flex; + justify-content: center; +` + +const Row = styled.div` + display: flex; + flex-wrap: wrap; + gap: 20px; /* Gap between columns */ + width: 100%; +` + +const RowWrapper = styled.div` + display: flex; + flex-wrap: wrap; + gap: 10px; /* Gap between columns */ + width: 100%; +` + +const Column = styled.div` + flex: 1; + padding: 16px; + border-radius: 20px; + border-radius: 8px; + font-family: 'DM Sans', sans-serif; + border: 1px solid rgba(160, 160, 160, 0.4); + background: rgba(255, 255, 255, 0.05); + color: ${({ theme }) => theme.text1}; + &:focus { + box-shadow: 0 0 0 1px ${({ theme }) => theme.bg4}; + } + &:hover { + box-shadow: 0 0 0 1px ${({ theme }) => theme.bg4}; + } + &:active { + box-shadow: 0 0 0 1px ${({ theme }) => theme.bg4}; + } + width: calc(33.33% - 20px); /* Adjust width and subtract gap */ + + @media (max-width: 768px) { + width: 100%; /* Each column occupies 100% width on mobile */ + } +` + +// Main container for the row +const RowContainer = styled.div` + display: flex; + flex-wrap: wrap; + margin: 0 -15px; // Assuming you want some spacing + @media (max-width: 768px) { + flex-direction: column; + } +` + +// Styled component for the first column (40%) +const FirstColumn = styled.div` + width: 30%; + padding: 0 15px; // For spacing + @media (max-width: 768px) { + width: 100%; + } +` + +// Styled component for the second column (60%) +const MobileWrapper = styled.div` + @media (max-width: 768px) { + padding: 10px; + } +` + export default function Rewards() { const [pairsData, setPairsData] = useState([]) const { address, chainId } = useAccountDetails() @@ -532,28 +603,26 @@ export default function Rewards() { pair.token1.symbol === 'ETH' ? pair.token1 : allTokens[validateAndParseAddress(pair.token1.tokenAddress)] return ( - - -
- -
- - {pair?.token0?.symbol}-{pair?.token1?.symbol} - - -
Total APR:
-
{displayAprCommon}
-
- -
Fee APR:
-
{displayAprFee}
-
- -
STRK APR:
-
{displayAprStarknet}
-
-
-
+ +
+ +
+ + {pair?.token0?.symbol}-{pair?.token1?.symbol} + + +
Total APR:
+
{displayAprCommon}
+
+ +
Fee APR:
+
{displayAprFee}
+
+ +
STRK APR:
+
{displayAprStarknet}
+
+
) } @@ -574,6 +643,30 @@ export default function Rewards() { pendingText={''} /> + + + + StarkNet DeFi Spring + + 40M starknet_logo STRK + + + JediSwap users will receive STRK incentives as part of the StarkNet DeFi Spring Program. + + + + + Earn STRK incentives by providing liquidity to these pools: + + + {pairsData.map(pair => ( + + ))} + + + + + {/* @@ -588,19 +681,9 @@ export default function Rewards() { -
- Earn STRK incentives by providing liquidity to these pools: - - - {pairsData.map(pair => ( - - ))} - - -
-
+ */}
@@ -613,9 +696,10 @@ export default function Rewards() { Your STRK Rewards - - - + + + + <> @@ -623,10 +707,8 @@ export default function Rewards() { {allocations?.toSignificant() ?? 0} - - - - + + <> @@ -634,10 +716,8 @@ export default function Rewards() { {formattedClaimRewards?.toSignificant() ?? 0} - - - - + + <> @@ -660,9 +740,9 @@ export default function Rewards() { ) : null} - - - + + +