We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b43503d commit 766ac4eCopy full SHA for 766ac4e
src/components/docFeedback/index.tsx
@@ -24,6 +24,17 @@ export function DocFeedback({pathname}: Props) {
24
}
25
}, [pathname]);
26
27
+ // Auto-close modal after feedback submission
28
+ useEffect(() => {
29
+ if (feedbackSubmitted && showFeedbackModal) {
30
+ const timer = setTimeout(() => {
31
+ setShowFeedbackModal(false);
32
+ }, 3000);
33
+
34
+ return () => clearTimeout(timer);
35
+ }
36
+ }, [feedbackSubmitted, showFeedbackModal]);
37
38
const handleFeedback = (helpful: boolean) => {
39
emit('Doc Feedback', {props: {page: pathname, helpful}});
40
0 commit comments