diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index 7e62651..1290688 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -1,118 +1,21 @@ -// import React from "react"; -// import Link from "next/link"; -import React, { useCallback, useRef, useState } from "react"; -// import Image from "next/image"; +import React from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { faHome, faPlus } from "@fortawesome/free-solid-svg-icons"; +import { faBell, faEnvelope, faHome, faPlus, faSearch } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -// import { hardhat } from "viem/chains"; -// import Image from "next/image"; -import { useAccount } from "wagmi"; -// import { CurrencyDollarIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { HeartIcon } from "@heroicons/react/24/outline"; -// import { SwitchTheme } from "~~/components/SwitchTheme"; -// import { PlusIcon } from "@heroicons/react/24/solid"; -// import { Bars3Icon } from "@heroicons/react/24/outline"; -import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; -import { useOutsideClick, useScaffoldReadContract } from "~~/hooks/scaffold-eth"; - -// import { Faucet } from "~~/components/scaffold-eth"; -// import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; - -// import { useGlobalState } from "~~/services/store/store"; /** * Site footer */ export const Footer = () => { - const [isMenuOpen, setIsMenuOpen] = useState(false); - - // const pathname = usePathname(); // Add this line to track the active route - - const { address: connectedAddress, isConnected } = useAccount(); - // const { writeContractAsync: usdcWriteAsync } = useScaffoldWriteContract("MockUSDC"); - - const { data: profileInfo } = useScaffoldReadContract({ - contractName: "ProfileInfo", - functionName: "profiles", - args: [connectedAddress], - watch: true, - }); - - // const { data: usdcBalance } = useScaffoldReadContract({ - // contractName: "MockUSDC", - // functionName: "balanceOf", - // args: [connectedAddress], - // watch: true, - // }); - - // const handleMintUSDC = async () => { - // try { - // await usdcWriteAsync({ - // functionName: "mint", - // args: [connectedAddress, BigInt(100e6)], // Mint 1 USDC - // }); - - // notification.success("USDC Minted Successfully"); - // } catch (error) { - // console.error("Error during minting:", error); - - // // Log the error and notify the user - // notification.error("Minting failed, please try again."); - // } - // }; - - const defaultProfilePicture = "https://ipfs.io/ipfs/QmVCvzEQHFKzAYSsou8jEJtWdFj31n2XgPpbLjbZqui4YY"; - - const profilePicture = profileInfo && profileInfo[2] ? profileInfo[2] : defaultProfilePicture; - - // const burgerMenuRef = useRef(null); - // useOutsideClick( - // burgerMenuRef, - // useCallback(() => setIsDrawerOpen(false), []), - // ); - - const menuRef = useRef(null); - const pathname = usePathname(); - useOutsideClick( - menuRef, - useCallback(() => setIsMenuOpen(false), []), - ); - - // const nativeCurrencyPrice = useGlobalState(state => state.nativeCurrency.price); - // const { targetNetwork } = useTargetNetwork(); - // const isLocalNetwork = targetNetwork.id === hardhat.id; - return ( <>
- {/*
*/} -
- {/*
- {nativeCurrencyPrice > 0 && ( -
-
- - {nativeCurrencyPrice.toFixed(2)} -
-
- )} - {isLocalNetwork && ( - <> - - - - Block Explorer - - - )} -
*/} - {/* */} -
+
    @@ -140,86 +43,39 @@ export const Footer = () => {
-
-
- - - -
- -
- - - - -
- -
- {isConnected ? ( - // <> - - //
- // {/* Wrap Image in a div and set explicit width/height */} - //
- // USDC Logo - //
- - // {usdcBalance ? Number(usdcBalance) / 1e6 : 0} - //
- <> -
setIsMenuOpen(!isMenuOpen)} - style={{ - backgroundImage: `url(${profilePicture})`, - backgroundSize: "cover", - backgroundPosition: "center", - }} - >
- - ) : ( - - )} - {isMenuOpen && isConnected && ( -
-
- -
- -
- - My Profile - - -
-
- )} -
-
+
+ + + + + + + + + + + + + + + + +
); }; diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index a542200..7f7351c 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -127,6 +127,9 @@ export const Header = () => { return (
+
+ +
-
+
{isConnected ? ( - // <> - - //
- // {/* Wrap Image in a div and set explicit width/height */} - //
- // USDC Logo - //
- - // {usdcBalance ? Number(usdcBalance) / 1e6 : 0} - //
<> -
- +
+ {/* */}