-
Notifications
You must be signed in to change notification settings - Fork 3
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
Prettier error-page #836
base: main
Are you sure you want to change the base?
Prettier error-page #836
Conversation
373cc6d
to
e6c01af
Compare
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.
first pr! good job :)
) : ( | ||
<span className="text-red-600 text-center block">An unknown error occurred.</span> | ||
)} | ||
<button |
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.
We have a custom Button component in components/elements that you can use for any buttons you create, it's pre styled.
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.
I think we can just use a div here instead of a button though (put the div inside the Link component)
<span className="text-red-600 text-center block">An unknown error occurred.</span> | ||
)} | ||
<button | ||
onClick={handleGoHome} |
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.
instead of using navigate we can use the React Router Link component https://reactrouter.com/en/main/components/link
It'll simplify the logic a bit, I think that navigate should be used for more complicated logic
also make sure to run |
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.
Looks good to me other than the one idea i had for automatic error injection into the email link! Please give that a look and then re-request review 😄
<PageTitle>Oops, something went wrong.</PageTitle> | ||
<p> | ||
<p className="text-center"> | ||
Please reach out on Discord or to [email protected] with the |
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.
Let's replace this with whatever the standard way to link to an email address is! Maybe:
<a href="mailto:[email protected]?subject=play.battlecode.org%20Bug%20Report&body=This%20is%20the%20email%20body">[email protected]</a>
where the body is the error message and page name (or some other well-formatted embedding of the error information 😃)
closes #796