Skip to content

Commit

Permalink
fix: close popup
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufgns committed Oct 23, 2023
1 parent 1f9edce commit df40c28
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { useState } from "react";
const Feedback = () => {
const { t } = useTranslation();
const [active, setActive] = useState();
const [popup, setPopup] = useState(false);
const feedbacks = useFeedbacksConstants();
const [inputValue, setInputValue] = useState<string>("");
const [calendarOpen, setCalendarOpen] = useState(false);
const [FeedBack, { status, isLoading, data }] = usePostFeedBackMutation();

const handleSubmitFeedback = () => {
Expand All @@ -33,11 +33,11 @@ const Feedback = () => {
rate: active,
})
.then(() => {
setPopup(false);
toast({
title: t("notifications.success"),
description: t("feedback.success"),
});
setCalendarOpen(false);
})
.catch(() => {
toast({
Expand All @@ -47,14 +47,9 @@ const Feedback = () => {
});
};

const testHandle = () => {
console.log("test");
setPopup(true);
};

return (
<Popover>
<PopoverTrigger>
<Popover open={calendarOpen} onOpenChange={setCalendarOpen}>
<PopoverTrigger asChild>
<Button variant="outline">{t("feedback.title")}</Button>
</PopoverTrigger>
<PopoverContent className="w-80">
Expand Down

0 comments on commit df40c28

Please sign in to comment.