-
-
Notifications
You must be signed in to change notification settings - Fork 128
fix: show success message on bug report submission #1512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,11 +19,8 @@ const BugReportForm = () => { | |||||
| const mutation = useMutation({ | ||||||
| mutationFn: (values: CreateIssuePostRequest) => | ||||||
| ISSUES_API.issuesCreatePost({ createIssuePostRequest: values }), | ||||||
| onSuccess: (response) => { | ||||||
| if (response.data?.state === 'open') { | ||||||
| form.resetFields() | ||||||
| // setFileList([]) | ||||||
| } | ||||||
| onSuccess: () => { | ||||||
| form.resetFields() | ||||||
| }, | ||||||
| onError: (error) => { | ||||||
| console.error('Error submitting bug report:', error) | ||||||
|
|
@@ -62,11 +59,15 @@ const BugReportForm = () => { | |||||
| </p> | ||||||
| }> | ||||||
| <span>{t('reportBug.description')}</span> | ||||||
| {mutation.isSuccess && mutation.data?.data && ( | ||||||
| {mutation.isSuccess && ( | ||||||
| <Alert severity="success" sx={{ marginBottom: 2 }}> | ||||||
| <a href={mutation.data.data.url} target="_blank" rel="noopener noreferrer"> | ||||||
| {t('reportBug.viewIssue')} (Github) | ||||||
| </a> | ||||||
| {mutation.data?.data?.url ? ( | ||||||
| <a href={mutation.data.data.url} target="_blank" rel="noopener noreferrer"> | ||||||
| {t('reportBug.viewIssue')} (Github) | ||||||
| </a> | ||||||
| ) : ( | ||||||
| t('reportBug.success', { defaultValue: 'Bug report submitted successfully!' }) | ||||||
|
||||||
| t('reportBug.success', { defaultValue: 'Bug report submitted successfully!' }) | |
| t('reportBug.success') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link label uses "Github"; the correct brand capitalization is "GitHub" (and other strings in the repo use "GitHub"). Please update the text to avoid inconsistent UI copy.