From 3638b72090426bfc0b112f08ba9c53896e704b03 Mon Sep 17 00:00:00 2001 From: panosdb Date: Sun, 6 Oct 2024 15:33:40 +0300 Subject: [PATCH] Make the treasury responsive --- components/Modal.tsx | 2 +- components/TreasuryAccount/AccountOverview.tsx | 4 ++-- components/treasuryV2/Details/MintDetails/Header.tsx | 5 +++-- components/treasuryV2/Details/TokenDetails/Header.tsx | 5 +++-- .../Details/WalletDetails/AddAssetModal/index.tsx | 5 +++-- components/treasuryV2/Details/WalletDetails/Header.tsx | 7 ++++++- pages/dao/[symbol]/treasury/v2/index.tsx | 5 +++-- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/components/Modal.tsx b/components/Modal.tsx index f91d89739..a1e56f64e 100644 --- a/components/Modal.tsx +++ b/components/Modal.tsx @@ -53,7 +53,7 @@ const Modal = ({ {isOpen ? (
diff --git a/components/TreasuryAccount/AccountOverview.tsx b/components/TreasuryAccount/AccountOverview.tsx index 150765727..a57e6d3b8 100644 --- a/components/TreasuryAccount/AccountOverview.tsx +++ b/components/TreasuryAccount/AccountOverview.tsx @@ -27,7 +27,7 @@ export const StrategyCard = ({ currentDeposits.toFixed(2) ).toFormat() return ( -
+
{strat.protocolLogoSrc ? (
-
+
{apy &&

{apyHeader ?? 'Interest Rate'}

}

{apy}

diff --git a/components/treasuryV2/Details/MintDetails/Header.tsx b/components/treasuryV2/Details/MintDetails/Header.tsx index c28f1aefb..342d2fdf8 100644 --- a/components/treasuryV2/Details/MintDetails/Header.tsx +++ b/components/treasuryV2/Details/MintDetails/Header.tsx @@ -120,7 +120,8 @@ export default function Header(props: Props) { props.className, 'bg-bkg-1', 'gap-x-4', - 'grid-cols-[1fr_max-content]', + 'grid-cols-1', + 'sm:grid-cols-[1fr_max-content]', 'grid', 'min-h-[128px]', 'px-8', @@ -176,7 +177,7 @@ export default function Header(props: Props) {
)}
-
+
@@ -127,7 +128,7 @@ export default function Header(props: Props) {
-
+
{props.asset.raw.extensions.transferAddress ? (
@@ -102,7 +103,7 @@ export default function AddAssetModal(props: Props) {
{isWallet(props.wallet) && (
-
OR
+
OR
)} {isWallet(props.wallet) && ( diff --git a/components/treasuryV2/Details/WalletDetails/Header.tsx b/components/treasuryV2/Details/WalletDetails/Header.tsx index e70330de6..1573858c1 100644 --- a/components/treasuryV2/Details/WalletDetails/Header.tsx +++ b/components/treasuryV2/Details/WalletDetails/Header.tsx @@ -53,7 +53,12 @@ export default function Header(props: Props) { 'py-4', 'flex', 'items-center', - 'justify-between' + 'justify-between', + 'flex-col', + 'space-y-4', + 'sm:flex-row', + 'sm:space-y-0', + 'sm:space-x-4' )} >
diff --git a/pages/dao/[symbol]/treasury/v2/index.tsx b/pages/dao/[symbol]/treasury/v2/index.tsx index f5346ec6a..6be5c4a21 100644 --- a/pages/dao/[symbol]/treasury/v2/index.tsx +++ b/pages/dao/[symbol]/treasury/v2/index.tsx @@ -76,7 +76,7 @@ export default function Treasury() { )} /> -
+
-
 
+
Details
+