feat: fix feedback modal
This commit is contained in:
		
							
								
								
									
										18
									
								
								App.tsx
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								App.tsx
									
									
									
									
									
								
							@ -551,6 +551,21 @@ export default function App() {
 | 
				
			|||||||
        setShowFeedback(false);
 | 
					        setShowFeedback(false);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const handleFeedbackShow = () => {
 | 
				
			||||||
 | 
					        // setShowFeedback(true);
 | 
				
			||||||
 | 
					        // setFeedbackMessage('');
 | 
				
			||||||
 | 
					        Sentry.showReportDialog({
 | 
				
			||||||
 | 
					            title: "Feedback zu Softwarearchitektur Übungen",
 | 
				
			||||||
 | 
					            subtitle: "Bug gefunden, Aufgabenidee, oder sonstiges Feedback? Sag gerne bescheid!",
 | 
				
			||||||
 | 
					            subtitle2: "Dein Feedback hilft mir, die Übungen zu verbessern.",
 | 
				
			||||||
 | 
					            labelName: "Dein Name (optional)",
 | 
				
			||||||
 | 
					            labelEmail: "Deine E-Mail (optional, falls du eine Antwort möchtest, sonst einfach example@example.com)",
 | 
				
			||||||
 | 
					            labelComments: "Dein Feedback",
 | 
				
			||||||
 | 
					            buttonLabel: "Feedback senden",
 | 
				
			||||||
 | 
					            labelSubmit: "Absenden",
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // --- API KEY STATE ---
 | 
					    // --- API KEY STATE ---
 | 
				
			||||||
    const [apiKey, setApiKey] = useState<string>('');
 | 
					    const [apiKey, setApiKey] = useState<string>('');
 | 
				
			||||||
    const [showSettings, setShowSettings] = useState(false);
 | 
					    const [showSettings, setShowSettings] = useState(false);
 | 
				
			||||||
@ -604,10 +619,11 @@ export default function App() {
 | 
				
			|||||||
    return (
 | 
					    return (
 | 
				
			||||||
        <div className="min-h-screen flex flex-col p-4 md:p-8">
 | 
					        <div className="min-h-screen flex flex-col p-4 md:p-8">
 | 
				
			||||||
            {/* Feedback Button */}
 | 
					            {/* Feedback Button */}
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            <button
 | 
					            <button
 | 
				
			||||||
                className="fixed top-4 right-16 z-50 bg-white rounded-full p-2 shadow hover:bg-slate-100 transition"
 | 
					                className="fixed top-4 right-16 z-50 bg-white rounded-full p-2 shadow hover:bg-slate-100 transition"
 | 
				
			||||||
                aria-label="Feedback"
 | 
					                aria-label="Feedback"
 | 
				
			||||||
                onClick={() => setShowFeedback(true)}
 | 
					                onClick={handleFeedbackShow}
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
                <ChatBubbleLeftRightIcon className="w-7 h-7 text-slate-600" />
 | 
					                <ChatBubbleLeftRightIcon className="w-7 h-7 text-slate-600" />
 | 
				
			||||||
            </button>
 | 
					            </button>
 | 
				
			||||||
 | 
				
			|||||||
@ -7,10 +7,11 @@ import * as Sentry from "@sentry/react";
 | 
				
			|||||||
Sentry.init({
 | 
					Sentry.init({
 | 
				
			||||||
  dsn: "https://2851a11b9f1b4715b389979628da322f@glitchtip.yandrik.dev/3",
 | 
					  dsn: "https://2851a11b9f1b4715b389979628da322f@glitchtip.yandrik.dev/3",
 | 
				
			||||||
  integrations: [
 | 
					  integrations: [
 | 
				
			||||||
    Sentry.feedbackIntegration({
 | 
					    // Sentry.feedbackIntegration({
 | 
				
			||||||
      // Additional SDK configuration goes in here, for example:
 | 
					      // Additional SDK configuration goes in here, for example:
 | 
				
			||||||
      colorScheme: "system",
 | 
					      // colorScheme: "system",
 | 
				
			||||||
    }),
 | 
					
 | 
				
			||||||
 | 
					    // }),
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user