From 6deb2e1272bf3003029116539d7fd1b0f5206a1c Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Tue, 10 Dec 2024 09:38:37 +0100 Subject: [PATCH 1/2] Remove unneeded disconnect button --- dapp/src/components/Header/ConnectWallet.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dapp/src/components/Header/ConnectWallet.tsx b/dapp/src/components/Header/ConnectWallet.tsx index 248b31b8c..8040b47da 100644 --- a/dapp/src/components/Header/ConnectWallet.tsx +++ b/dapp/src/components/Header/ConnectWallet.tsx @@ -97,7 +97,7 @@ export default function ConnectWallet() { id: "Disconnect", icon: IconLogout, label: "Disconnect", - onClick: onDisconnect, + onClick: handleDisconnectWallet, closeOnSelect: true, isSupported: true, }, @@ -191,17 +191,6 @@ export default function ConnectWallet() { ), )} - - - } - px={2} - boxSize={5} - onClick={handleDisconnectWallet} - /> - From 8a5912f228745923615d9f16274ef70894b9bf66 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Tue, 10 Dec 2024 10:39:39 +0100 Subject: [PATCH 2/2] Use icons from `tabler` package --- dapp/src/assets/icons/ArrowUpRight.tsx | 16 ---------------- dapp/src/assets/icons/BoltFilled.tsx | 13 ------------- dapp/src/assets/icons/index.ts | 2 -- dapp/src/components/Footer.tsx | 5 +++-- dapp/src/components/shared/ButtonLink.tsx | 6 +++--- dapp/src/components/shared/ProgressBar.tsx | 5 +++-- dapp/src/pages/DashboardPage/AcreTVLMessage.tsx | 6 ++++-- 7 files changed, 13 insertions(+), 40 deletions(-) delete mode 100644 dapp/src/assets/icons/ArrowUpRight.tsx delete mode 100644 dapp/src/assets/icons/BoltFilled.tsx diff --git a/dapp/src/assets/icons/ArrowUpRight.tsx b/dapp/src/assets/icons/ArrowUpRight.tsx deleted file mode 100644 index a61f54b38..000000000 --- a/dapp/src/assets/icons/ArrowUpRight.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react" -import { createIcon } from "@chakra-ui/react" - -export const ArrowUpRight = createIcon({ - displayName: "ArrowUpRight", - viewBox: "0 0 16 17", - path: ( - - ), -}) diff --git a/dapp/src/assets/icons/BoltFilled.tsx b/dapp/src/assets/icons/BoltFilled.tsx deleted file mode 100644 index 8252422d9..000000000 --- a/dapp/src/assets/icons/BoltFilled.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react" -import { createIcon } from "@chakra-ui/react" - -export default createIcon({ - displayName: "BoltFilled", - viewBox: "0 0 24 24", - path: [ - , - ], -}) diff --git a/dapp/src/assets/icons/index.ts b/dapp/src/assets/icons/index.ts index 7a8fe57c2..eb50fc819 100644 --- a/dapp/src/assets/icons/index.ts +++ b/dapp/src/assets/icons/index.ts @@ -1,4 +1,3 @@ -export * from "./ArrowUpRight" export * from "./AcreLogo" export * from "./Pause" export { default as LoadingSpinnerSuccessIcon } from "./LoadingSpinnerSuccessIcon" @@ -8,4 +7,3 @@ export * from "./MezoSignIcon" export * from "./AcreSignIcon" export * from "./BitcoinsStackErrorIcon" export { default as MatsIcon } from "./MatsIcon" -export { default as BoltFilled } from "./BoltFilled" diff --git a/dapp/src/components/Footer.tsx b/dapp/src/components/Footer.tsx index d80161d7f..c32c4c7ed 100644 --- a/dapp/src/components/Footer.tsx +++ b/dapp/src/components/Footer.tsx @@ -10,8 +10,9 @@ import { Icon, } from "@chakra-ui/react" import { EXTERNAL_HREF } from "#/constants" -import { AcreSignIcon, ArrowUpRight } from "#/assets/icons" +import { AcreSignIcon } from "#/assets/icons" import { useMobileMode } from "#/hooks" +import { IconArrowUpRight } from "@tabler/icons-react" type FooterListItem = Pick @@ -64,7 +65,7 @@ const getItemsList = ( as={Link} __css={styles.link} iconSpacing={0} - rightIcon={} + rightIcon={} {...link} isExternal /> diff --git a/dapp/src/components/shared/ButtonLink.tsx b/dapp/src/components/shared/ButtonLink.tsx index dcd65de61..3f8f13af0 100644 --- a/dapp/src/components/shared/ButtonLink.tsx +++ b/dapp/src/components/shared/ButtonLink.tsx @@ -1,16 +1,16 @@ import React from "react" import { Button, ButtonProps, Icon, Link, LinkProps } from "@chakra-ui/react" -import { ArrowUpRight } from "#/assets/icons" +import { IconArrowUpRight, TablerIcon } from "@tabler/icons-react" type ButtonLinkProps = ButtonProps & LinkProps & { - icon?: typeof Icon + icon?: TablerIcon iconColor?: string } export default function ButtonLink({ children, - icon = ArrowUpRight, + icon = IconArrowUpRight, iconColor = "brand.400", variant = "outline", ...props diff --git a/dapp/src/components/shared/ProgressBar.tsx b/dapp/src/components/shared/ProgressBar.tsx index e5467bc2d..ca8b52c1d 100644 --- a/dapp/src/components/shared/ProgressBar.tsx +++ b/dapp/src/components/shared/ProgressBar.tsx @@ -1,6 +1,6 @@ import React from "react" import { Progress, ProgressProps, ProgressLabel, Icon } from "@chakra-ui/react" -import { BoltFilled } from "#/assets/icons" +import { IconBolt } from "@tabler/icons-react" type ProgressBarProps = ProgressProps & { withBoltIcon?: boolean @@ -23,7 +23,8 @@ function ProgressBar(props: ProgressBarProps) { transform="auto" translateX="-100%" translateY="-50%" - as={BoltFilled} + as={IconBolt} + fill="currentcolor" mx={-1} /> )} diff --git a/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx b/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx index 0960e95af..ad75cefdd 100644 --- a/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx +++ b/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx @@ -1,7 +1,7 @@ import React from "react" import { Box, HStack, StackProps, VStack } from "@chakra-ui/react" import { useAllActivitiesCount, useStatistics, useWallet } from "#/hooks" -import { BoltFilled } from "#/assets/icons" +import { IconBolt } from "@tabler/icons-react" import { TextMd } from "#/components/shared/Typography" import { CurrencyBalance } from "#/components/shared/CurrencyBalance" @@ -20,7 +20,9 @@ export default function AcreTVLMessage(props: AcreTVLMessageProps) { return ( - + + + {tvl.isCapExceeded ? (