Skip to content

Commit

Permalink
changing return to dashboards with functioning logout button on error…
Browse files Browse the repository at this point in the history
… page

Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
leanneeliatra committed Sep 20, 2023
1 parent aaee6ee commit deeb449
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/apps/customerror/custom-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Router, Route } from 'react-router-dom';
import { ERROR_MISSING_ROLE_PATH } from '../../../common';
import { ClientConfigType } from '../../types';
import './_index.scss';
import { logout } from '../account/utils';

interface CustomErrorDeps {
title: string;
Expand All @@ -45,8 +46,8 @@ export function CustomErrorPage(props: CustomErrorDeps) {
{props.subtitle}
</EuiText>
<EuiSpacer size="s" />
<EuiButton fill href={props.http.basePath.serverBasePath} fullWidth>
Back to OpenSearch Dashboards Home
<EuiButton fill onClick={() => logout(props.http, '')} fullWidth>

Check warning on line 49 in public/apps/customerror/custom-error.tsx

View check run for this annotation

Codecov / codecov/patch

public/apps/customerror/custom-error.tsx#L49

Added line #L49 was not covered by tests
Logout
</EuiButton>
</EuiListGroup>
);
Expand Down

0 comments on commit deeb449

Please sign in to comment.