import React from "react"; import Link from "next/link"; import { Box, Text, Image, Center, HStack, IconButton, useColorModeValue, } from "@chakra-ui/react"; import { IoCloudDownloadOutline } from "react-icons/io5"; import { FiExternalLink } from "react-icons/fi"; import download from "downloadjs"; import toast from "react-hot-toast"; import Tap from "animations/tap"; const Index = ({ title, url, href }) => { const toastBg = useColorModeValue("#F2F2F2", "#1D1D1D"); const toastColor = useColorModeValue("black", "white"); const bgImage = useColorModeValue("transparent", "#E9E9E9"); const borderRds = useColorModeValue("0", "15px"); const downloadSvg = (url) => { toast(`Downloading ${title}...`, { icon: "🥳", style: { borderRadius: "10px", background: toastBg, color: toastColor, }, }); download(url); }; return (
{title}
{title}
} onClick={() => downloadSvg(href)} /> } />
); }; export default Index;