Skip to content
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

adding the three buttons needed and reworked the texts #1191

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions frontend/src/components/ErrorBoundary/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ class ErrorBoundary extends React.Component<Props, State> {
window.location.href = '/degree-wizard';
};

const gotoCourses = () => {
window.location.href = '/course-selector';
const gotoLanding = () => {
window.location.href = '/';
};

const gotologout = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotoLogout

window.location.href = '/logout';
};

const openModal = () => {
Expand All @@ -57,28 +61,34 @@ class ErrorBoundary extends React.Component<Props, State> {
return (
<S.Container>
<ResetModal open={modalOpen} onOk={gotoDegrees} onCancel={closeModal} />
<h1>An error has occurred. You should never see this...</h1>
<h1>An error has occurred, please try the following steps:</h1>
<S.TextBody>
<p>
Unfortunately, due to a bug in Circles, an error has occurred. If you want to help us
fix this bug, please let us know! We would greatly appreciate it!
1. Try refreshing the current page. If the issue persists, consider the options below:
</p>
<p>
2. Send us a screenshot of this page along with a brief description of what you were
doing when the error occurred by filling out this form&nbsp;
<a href={FEEDBACK_LINK} target="_blank" rel="noreferrer">
here
</a>
.
</p>
{/* <p>
Fill in this form&nbsp;
<a href={FEEDBACK_LINK} target="_blank" rel="noreferrer">
here
</a>
&nbsp;to inform us how the error occurred! Please also include brief description on
the steps that led up to the error and a copy of the error messages seen below.
</p>
<p>
If you are seeing this page often, try to reset your data by clicking the &apos;Reset
Data&apos; button. Otherwise, you can return back to planning your future degree!
</p>
</p> */}
<Space wrap>
<Button onClick={gotoCourses} type="primary">
<Button onClick={gotoLanding} type="primary">
Return to Circles
</Button>
<Button onClick={gotologout} type="primary">
Logout
</Button>
<Button onClick={openModal} type="primary" danger>
Reset Data
</Button>
Expand Down
Loading