diff --git a/front/src/components/Address/index.tsx b/front/src/components/Address/index.tsx new file mode 100644 index 0000000..9d2d87b --- /dev/null +++ b/front/src/components/Address/index.tsx @@ -0,0 +1,34 @@ +import { useMe } from "@/providers/MeProvider"; +import { CopyIcon } from "@radix-ui/react-icons"; +import { Button, Tooltip } from "@radix-ui/themes"; +import { CSSProperties, useState } from "react"; + +type Props = { + style?: CSSProperties; +}; + +export default function Address(props: Props) { + const [isCopied, setIsCopied] = useState(false); + const { me } = useMe(); + + if (!me) { + return null; + } + + return ( + + + + ); +} diff --git a/front/src/components/Balance/index.tsx b/front/src/components/Balance/index.tsx index a2fd16a..6ef1214 100644 --- a/front/src/components/Balance/index.tsx +++ b/front/src/components/Balance/index.tsx @@ -5,7 +5,7 @@ import { Flex, Text } from "@radix-ui/themes"; import { CSSProperties, useEffect } from "react"; const css: CSSProperties = { - margin: "1rem", + padding: "2.5rem 0", }; export default function Balance() { @@ -14,10 +14,10 @@ export default function Balance() { return ( - + ${intBalance} - + .{decimals} diff --git a/front/src/components/HomePage/index.tsx b/front/src/components/HomePage/index.tsx index ee20618..d940504 100644 --- a/front/src/components/HomePage/index.tsx +++ b/front/src/components/HomePage/index.tsx @@ -2,28 +2,25 @@ import OnBoarding from "@/components/OnBoarding"; import { useMe } from "@/providers/MeProvider"; -import { Button } from "@radix-ui/themes"; +import { Button, Flex } from "@radix-ui/themes"; import Balance from "../Balance"; import NavBar from "../NavBar"; import History from "../History"; import { Text } from "@radix-ui/themes"; +import Address from "@/components/Address"; export default function Home() { const { me, disconnect } = useMe(); if (me) { return ( -
- {me?.account && ( - - {me.account.slice(0, 6)}...{me.account.slice(-4)} - - )} + +
-
+ ); } else { return ; diff --git a/front/src/components/NavBar/index.tsx b/front/src/components/NavBar/index.tsx index 444fe62..81b6d26 100644 --- a/front/src/components/NavBar/index.tsx +++ b/front/src/components/NavBar/index.tsx @@ -12,14 +12,14 @@ export default function NavBar() { return ( - diff --git a/front/src/components/SendTransaction.tsx b/front/src/components/SendTransaction.tsx index 69855be..367a55e 100644 --- a/front/src/components/SendTransaction.tsx +++ b/front/src/components/SendTransaction.tsx @@ -120,16 +120,16 @@ export function SendTransaction() { {txReceipt && !isLoading && ( <> - + - + See transaction - +