Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function UnhandledErrors(props: Props) {
<ErrorStatus
message={
!errorsToDisplay.isEmpty() && (
<details className={cx('--Details')}>
<details open className={cx('--Details')}>
<summary>Error details</summary>
{errorsToDisplay}
</details>
Expand Down
15 changes: 13 additions & 2 deletions packages/libs/web-common/src/component-wrappers/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,30 @@ export function Error(DefaultComponent: React.ComponentType<Props>) {
</Link>
);

const refreshPage = () => {
window.location.reload();
};
Copy link
Member

Choose a reason for hiding this comment

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

Nice. I haven't tested, but this should work better than what we had before!


return (
<DefaultComponent message={props.message}>
{props.children || (
<>
<div style={style}>
<p>
1- Try{' '}
<a href="" title="Reload the current page.">
<a
href=""
title="Reload the current page"
onClick={refreshPage}
>
reloading the page
</a>
</p>
<p>2- If the problem persists, try {resetLink}</p>
<p>3- Please {contactUsLink} to assist you</p>
<p>
3- Please {contactUsLink} to assist you;{' '}
<strong>send us a screenshot of this window.</strong>
Copy link
Member

Choose a reason for hiding this comment

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

I'd soften this to:

Please {contactUsLink} for help. Including a screenshot of the page and this error along with the page URL will help us resolve it faster.

</p>
</div>
<div>{props.message}</div>
</>
Expand Down
Loading