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

Dashboard error refresh #1322

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
14 changes: 14 additions & 0 deletions src/client/app/components/router/ErrorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ import translate from '../../utils/translate';
/**
* @returns A error page that then returns to main dashboard page.
*/

export default function ErrorComponent() {
const nav = useNavigate();
const refreshPage = () => {
nav('/');
window.location.reload();
};
return (
<AppLayout>
{/* Pass div as child prop to AppLayout */}
Expand All @@ -31,6 +36,15 @@ export default function ErrorComponent() {
>
{translate('return.dashboard')}
</Button>
<p>
{translate('page.user.refresh.directions')}
</p>
<Button
color='primary'
onClick={refreshPage}
>
{translate('page.restart.button')}
</Button>
</div>
</AppLayout>

Expand Down
6 changes: 6 additions & 0 deletions src/client/app/translations/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ const LocaleTranslationData = {
"options": "Options",
"page.choice.login": "Page choices & login",
"page.choice.logout": "Page choices & logout",
"page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session",
"page.restart.button": "Restart OED session",
"password": "Password",
"password.confirm": "Confirm password",
"per.day": "Per Day",
Expand Down Expand Up @@ -876,6 +878,8 @@ const LocaleTranslationData = {
"options": "Options",
"page.choice.login": "Page choices & login\u{26A1}",
"page.choice.logout": "Page choices & logout\u{26A1}",
"page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}",
"page.restart.button": "Restart OED session\u{26A1}",
"password": "Mot de passe",
"password.confirm": "Confirm password\u{26A1}",
"per.day": "Per Day\u{26A1}",
Expand Down Expand Up @@ -1372,6 +1376,8 @@ const LocaleTranslationData = {
"options": "Opciones",
"page.choice.login": "Selección de página y inicio de sesión",
"page.choice.logout": "Selección de página y fin de sesión",
"page.user.refresh.directions": "If clicking the 'Return to Dashboard button does not work then please click the button below to restart your OED session\u{26A1}",
"page.restart.button": "Restart OED session\u{26A1}",
"password": "Contraseña",
"password.confirm": "Confirmar contraseña",
"per.day": "Por día",
Expand Down
Loading