"use client";
import { useState } from "react";
import {
Flex,
VStack,
Heading,
Spacer,
Link,
Text,
Alert,
HStack,
Stack,
Center,
Button,
useDisclosure,
Modal,
ModalOverlay,
ModalContent,
ModalHeader,
ModalCloseButton,
ModalBody,
SimpleGrid,
GridItem,
Input,
InputGroup,
Container,
InputRightElement,
Box,
} from "@chakra-ui/react";
import { ExternalLinkIcon } from "@chakra-ui/icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { IconProp } from "@fortawesome/fontawesome-svg-core";
import { faTwitter, faDiscord } from "@fortawesome/free-brands-svg-icons";
import { useAccount, useNetwork } from "wagmi";
import { sendTransaction } from "wagmi/actions";
import { parseEther } from "viem";
import Confetti from "react-confetti";
import { CustomConnectButton } from "./CustomConnectButton";
const Social = ({ icon, link }: { icon: IconProp; link: string }) => {
return (
);
};
function Footer() {
const { isConnected } = useAccount();
const { chain } = useNetwork();
const {
isOpen: isSupportModalOpen,
onOpen: openSupportModal,
onClose: closeSupportModal,
} = useDisclosure();
const [donateValue, setDonateValue] = useState();
const [showConfetti, setShowConfetti] = useState(false);
const handleDonate = async (value: string) => {
try {
await sendTransaction({
to: process.env.NEXT_PUBLIC_DONATION_ADDRESS!,
value: parseEther(value),
});
launchConfetti();
} catch {}
};
const launchConfetti = () => {
setShowConfetti(true);
setTimeout(() => {
setShowConfetti(false);
}, 5_000);
};
return (
{showConfetti && (
)}
Found the project helpful?
{process.env.NEXT_PUBLIC_GITCOIN_GRANTS_ACTIVE === "true" ? (
<>
Support it on
Gitcoin Grants
>
) : (
<>
Support
Select amount to donate:
{["0.001", "0.005", "0.01"].map((value, i) => (
))}
or
setDonateValue(e.target.value)}
isDisabled={!isConnected || chain?.unsupported}
/>
Ξ
>
)}
Built by:{" "}
@apoorvlathey
{" "}
);
}
export default Footer;