diff --git a/app/page.tsx b/app/page.tsx index 6fc6489..98dce5c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -11,7 +11,7 @@ export default function Page() {

BEACON CHAIN DEPOSIT

Connect your wallet to get started:

- + Connect Wallet diff --git a/components/dappnodeDeposit.tsx b/components/dappnodeDeposit.tsx index 072ffc1..cdfa66b 100644 --- a/components/dappnodeDeposit.tsx +++ b/components/dappnodeDeposit.tsx @@ -288,7 +288,7 @@ function Validation({

)} ) : step === "summary" ? (
- Your transaction is completed ! View it - + Your transaction is completed ! + View it + here .
-
diff --git a/components/navigation-tab.tsx b/components/navigation-tab.tsx index 0d942ab..eb3f6f1 100644 --- a/components/navigation-tab.tsx +++ b/components/navigation-tab.tsx @@ -27,7 +27,7 @@ export default function NavigationTab({ value }: NavigationTabProps) { }; return ( -
+
{texts[value]}
); diff --git a/components/tooltip.tsx b/components/tooltip.tsx new file mode 100644 index 0000000..4f3125a --- /dev/null +++ b/components/tooltip.tsx @@ -0,0 +1,62 @@ +"use client"; + +import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; +import { InformationCircleIcon } from "@heroicons/react/20/solid"; +import { useState, useRef, useEffect } from "react"; + +interface ToolTipProps { + text: React.ReactNode; +} + +export default function ToolTip({ text }: ToolTipProps) { + const [isOpen, setIsOpen] = useState(false); + const popoverButtonRef = useRef(null); + + const handleMouseEnter = () => { + setIsOpen(true); + }; + + const handleMouseLeave = () => { + setIsOpen(false); + }; + + useEffect(() => { + const current = popoverButtonRef.current; + if (!current) { + return; + } + + const observer = new MutationObserver((mutations) => { + const hovered = mutations.find( + ({ attributeName }) => attributeName === "data-hover" + ); + const active = current.hasAttribute("data-active"); + + if (hovered && !active) { + current.click(); + } + }); + + observer.observe(current, { attributes: true }); + + return () => { + observer.disconnect(); + }; + }, [popoverButtonRef]); + + return ( + + + + + {isOpen && ( + + {text} + + )} + + ); +} diff --git a/components/withdrawal.tsx b/components/withdrawal.tsx index 32f5ad2..83ad233 100644 --- a/components/withdrawal.tsx +++ b/components/withdrawal.tsx @@ -7,6 +7,8 @@ import { Address, formatEther } from "viem"; import Link from "next/link"; import useBalance from "@/hooks/use-balance"; import { ContractNetwork } from "@/utils/contracts"; +import { InformationCircleIcon } from "@heroicons/react/24/outline"; +import ToolTip from "./tooltip"; interface WithdrawalProps { contractConfig: ContractNetwork | undefined; @@ -94,7 +96,15 @@ export default function Withdrawal({ ) : step === "claim" ? ( <>
- Set up automated claim with your preferred frequency and threshold. + Set up automated claim with your preferred frequency and threshold.{" "} + + Address will become eligable for claim if one of thresholds + reached. +

+ } + />
@@ -113,7 +123,7 @@ export default function Withdrawal({ type="radio" value={1} name="inline-radio-group" - className="w-4 h-4 accent-[#DD7143]" + className="w-4 h-4 accent-accent" />