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
8 changes: 3 additions & 5 deletions src/containers/App/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,11 @@ function GetUser({children}: {children: React.ReactNode}) {
const {isLoading, error} = authenticationApi.useWhoamiQuery({database});
const {appTitle} = useAppTitle();

const errorProps = error ? {...uiFactory.clusterOrDatabaseAccessError} : undefined;

return (
<LoaderWrapper loading={isLoading} size="l">
<PageError
error={error}
{...uiFactory.clusterOrDatabaseAccessError}
errorPageTitle={appTitle}
>
<PageError error={error} {...errorProps} errorPageTitle={appTitle}>
{children}
</PageError>
</LoaderWrapper>
Expand Down
5 changes: 4 additions & 1 deletion src/containers/Clusters/Clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ export function Clusters() {

const showBlockingError = isAccessError(query.error);

const errorProps = showBlockingError ? uiFactory.clusterOrDatabaseAccessError : undefined;

return (
<PageError
error={showBlockingError ? query.error : undefined}
{...uiFactory.clusterOrDatabaseAccessError}
{...errorProps}
errorPageTitle={uiFactory.clustersPageTitle ?? i18n('page_title')}
>
<div className={b()}>
<Helmet>
Expand Down
7 changes: 3 additions & 4 deletions src/containers/Tenant/Tenant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export function Tenant(props: TenantProps) {

const showBlockingError = isAccessError(error);

const errorProps = showBlockingError ? uiFactory.clusterOrDatabaseAccessError : undefined;

const onCollapseSummaryHandler = () => {
dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.triggerCollapse);
};
Expand All @@ -131,10 +133,7 @@ export function Tenant(props: TenantProps) {
titleTemplate={`%s — ${title} — ${appTitle}`}
/>
<LoaderWrapper loading={initialLoading}>
<PageError
error={showBlockingError ? error : undefined}
{...uiFactory.clusterOrDatabaseAccessError}
>
<PageError error={showBlockingError ? error : undefined} {...errorProps}>
<TenantContextProvider
database={database}
path={path}
Expand Down
Loading