Skip to content

Commit

Permalink
fix(OverviewPage): remomve NamepspacedPage wrapper from Overview page
Browse files Browse the repository at this point in the history
  • Loading branch information
sahil143 authored and rohitkrai03 committed Jun 4, 2024
1 parent e1546f7 commit eee873d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/NamespacedPage/NamespacedPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ import './NamespacedPage.scss';
type NamespacedPageProps = {
children: React.ReactNode;
hideAppBanner?: boolean;
skipWorkspaceCheck?: boolean;
};

const NamespacedPage: React.FunctionComponent<React.PropsWithChildren<NamespacedPageProps>> = ({
children,
hideAppBanner,
skipWorkspaceCheck = false,
}) => {
const { workspacesLoaded } = React.useContext(WorkspaceContext);

Expand All @@ -33,7 +35,7 @@ const NamespacedPage: React.FunctionComponent<React.PropsWithChildren<Namespaced
}
}, []);

if (!workspacesLoaded) {
if (!skipWorkspaceCheck && !workspacesLoaded) {
return (
<Bullseye>
<Spinner />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/OverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FULL_APPLICATION_TITLE } from '../consts/labels';

const OverviewPage: React.FC<React.PropsWithChildren<unknown>> = () => {
return (
<NamespacedPage hideAppBanner>
<NamespacedPage hideAppBanner skipWorkspaceCheck>
<Helmet>
<title>Overview | {FULL_APPLICATION_TITLE}</title>
</Helmet>
Expand Down

0 comments on commit eee873d

Please sign in to comment.