Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Jun 5, 2023
1 parent 7d3b521 commit 3d82e8e
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
* 2.0.
*/

import { Switch, Redirect } from 'react-router-dom';
import { Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import React, { memo } from 'react';
import { ENDPOINTS_PATH, SecurityPageName } from '../../../../common/constants';
import { useLinkExists } from '../../../common/links/links';
import { MANAGEMENT_ROUTING_HOST_ISOLATION_EXCEPTIONS_PATH } from '../../common/constants';
import { NotFoundPage } from '../../../app/404';
import { HostIsolationExceptionsList } from './view/host_isolation_exceptions_list';
Expand All @@ -18,15 +16,6 @@ import { HostIsolationExceptionsList } from './view/host_isolation_exceptions_li
* Provides the routing container for the hosts related views
*/
export const HostIsolationExceptionsContainer = memo(() => {
// TODO: Probably should not silently redirect here
const canAccessHostIsolationExceptionsLink = useLinkExists(
SecurityPageName.hostIsolationExceptions
);

if (!canAccessHostIsolationExceptionsLink) {
return <Redirect to={ENDPOINTS_PATH} />;
}

return (
<Switch>
<Route
Expand Down

0 comments on commit 3d82e8e

Please sign in to comment.