Skip to content

Commit

Permalink
review(HMS-2721): update according review
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo committed Jun 4, 2024
1 parent 283770c commit d736bcb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/Components/CenteredSpinner/CenteredSpinner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Bullseye, Spinner } from '@patternfly/react-core';
import './CenteredSpinner.scss';
import React from 'react';

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Routes/DetailPage/DetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ const DetailPage = () => {

console.log('INFO:DetailPage render:domain_id=' + domain_id);

if (appContext.rbac.isLoading) {
return <CenteredSpinner />;
}

// Load Domain to display
useEffect(() => {
if (!appContext.rbac.permissions.hasDomainsRead) {
Expand Down Expand Up @@ -123,6 +119,10 @@ const DetailPage = () => {
setActiveTabKey(tabIndex);
};

if (appContext.rbac.isLoading) {
return <CenteredSpinner />;
}

// Return render
return (
<>
Expand Down
8 changes: 4 additions & 4 deletions src/Routes/WizardPage/WizardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ const WizardPage = () => {
const linkLearnMoreAbout = 'https://access.redhat.com/articles/1586893';
const linkLearnMoreAboutRemovingDirectoryAndDomainServices = 'https://access.redhat.com/articles/1586893';

if (appContext.rbac.isLoading) {
return <CenteredSpinner />;
}

useEffect(() => {
if (!appContext.rbac.permissions.hasTokenCreate || !appContext.rbac.permissions.hasDomainsUpdate) {
navigate('/no-permissions', { replace: true });
Expand Down Expand Up @@ -240,6 +236,10 @@ const WizardPage = () => {

const title = 'Register identity domain';

if (appContext.rbac.isLoading) {
return <CenteredSpinner />;
}

return (
<>
<PageGroup>
Expand Down

0 comments on commit d736bcb

Please sign in to comment.