diff --git a/src/components/FeedbackWidget/FeedbackModal/index.tsx b/src/components/FeedbackWidget/FeedbackModal/index.tsx index 7b4d972..9daf55a 100644 --- a/src/components/FeedbackWidget/FeedbackModal/index.tsx +++ b/src/components/FeedbackWidget/FeedbackModal/index.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState } from "react"; -import Confetti from "react-confetti"; import { useForm } from "react-hook-form"; import { useWindowSize } from "react-use"; import { toast } from "react-hot-toast"; @@ -15,6 +14,9 @@ import { sendFeedback } from "./helper"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; +import dynamic from "next/dynamic"; + +const Confetti = dynamic(() => import("react-confetti")); type Props = { children: React.ReactNode; @@ -39,8 +41,8 @@ const FeedbackModal: React.FC = ({ children }) => { position: "top-center", }); - reset(); setOpen(false); + reset(); setConfetti(true); setTimeout(() => {