import 'uno.css'; import { captureFeedback } from '@sentry/react'; import React, { useState } from 'react'; import { Button } from './common/Button'; import Text from './common/Text/Text'; /** * ReportIssueMain component renders a feedback form for users to submit their email and feedback. * * @returns The rendered component. */ export default function ReportIssueMain(): JSX.Element { const [email, setEmail] = useState(''); const [feedback, setFeedback] = useState(''); const [isSubmitted, setIsSubmitted] = useState(false); const submitFeedback = async () => { if (!email || !feedback) { throw new Error('Email and feedback are required'); } // Here you would typically send the feedback to a server await captureFeedback( { message: feedback || 'No feedback provided', email, tags: { version: chrome.runtime.getManifest().version, }, }, { includeReplay: false, } ); // Reset form fields and close the dialog setEmail(''); setFeedback(''); setIsSubmitted(true); }; if (isSubmitted) { return (
Your feedback is music to our ears. Thanks for helping us improve!
Help us make UT Registration Plus even better!