adding in context for mui toast custom

This commit is contained in:
talksik
2022-04-19 06:33:42 -05:00
parent 06ea0a316a
commit cabf8052ca
4 changed files with 75 additions and 7 deletions
+4 -2
View File
@@ -1,14 +1,16 @@
import FullMottoLogo from "../../../components/logo/fullMotto";
import toast from "react-hot-toast";
import { useCallback } from "react";
import useNirvanaToast from "../providers/toastProvider";
const contactEmailAddress = "[email protected]";
export default function Footer() {
const toast = useNirvanaToast();
const copyToClipboard = useCallback(() => {
navigator.clipboard.writeText(contactEmailAddress);
toast.success("copied to clipboard");
toast.handleOpen("success", "copied to clipboard");
}, []);
return (