diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index aa22520..d34ec08 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -1,31 +1,30 @@ "use client"; +// Import necessary hooks and components import { useState } from "react"; -import { Button, Card, CardFooter, CardHeader, Container, Heading, Tooltip, useDisclosure } from "@chakra-ui/react"; -// import { QrScanner } from "@yudiel/react-qr-scanner"; -import type { NextPage } from "next"; import { useAccount } from "wagmi"; +// Import your custom components and hooks import { HistoryTable } from "~~/components/HistoryTable"; -import SendModal from "~~/components/SendModalPopup"; +import SendModalPopup from "~~/components/SendModalPopup"; import { useLightningApp } from "~~/hooks/LightningProvider"; import { useAccountBalance } from "~~/hooks/scaffold-eth"; -// Import the CSS file with your animation - -const Home: NextPage = () => { +const Home = () => { const { address } = useAccount(); const { balance } = useAccountBalance(address); const { isWebSocketConnected, price } = useLightningApp(); - const { isOpen, onClose, onOpen } = useDisclosure(); + const [isOpen, setIsOpen] = useState(false); + const onClose = () => setIsOpen(false); + const onOpen = () => setIsOpen(true); const [balanceVisibility, setBalanceVisibility] = useState(0); function getBalanceWithVisibility() { if (balance === null) return "Loading Balance..."; if (balanceVisibility === 0) { - return Math.floor(balance * 100_000_000).toLocaleString() + " sats"; + return `${Math.floor(balance * 100_000_000).toLocaleString()} sats`; } if (balanceVisibility === 1) { - return "$" + (balance * price).toFixed(2) + " USD"; + return `$${(balance * price).toFixed(2)} USD`; } if (balanceVisibility === 2) { return "****** sats"; @@ -33,50 +32,32 @@ const Home: NextPage = () => { } return ( - - - - +
+
+

setBalanceVisibility((balanceVisibility + 1) % 3)} - fontFamily={"IBM Plex Mono"} - mt="10%" - textAlign={"center"} - fontSize={"x-large"} > - {" "} - {getBalanceWithVisibility()} - - + {getBalanceWithVisibility()} +

+
- button": { - minW: "136px", - }, - }} - > - - - - - +
+ +
+
- -
+ + ); }; diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index 714887c..2317b00 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -1,6 +1,5 @@ import React from "react"; import Link from "next/link"; -import { Button } from "@chakra-ui/react"; import { hardhat } from "viem/chains"; import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { Faucet } from "~~/components/scaffold-eth"; @@ -22,9 +21,9 @@ export const Footer = () => {
{nativeCurrencyPrice > 0 && (
- +
)} {isLocalNetwork && ( diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index 3a00d42..7e0de65 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -3,7 +3,6 @@ import React, { useCallback, useRef, useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { Button, Image, Text } from "@chakra-ui/react"; import { Bars3Icon } from "@heroicons/react/24/outline"; import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; import { useLightningApp } from "~~/hooks/LightningProvider"; @@ -92,13 +91,8 @@ export const Header = () => {
- Botanix Logo -
- - {" "} - Botanix {"<>"} Lightning{" "} - -
+ Botanix Logo +
Botanix {"<>"} Lightning