Skip to content

Commit

Permalink
Merge pull request #2900 from Hyperkid123/use-suspense-loader
Browse files Browse the repository at this point in the history
Use suspense loader utility from FEC utils.
  • Loading branch information
Hyperkid123 authored Jul 19, 2024
2 parents 5ab9ad3 + 78b3589 commit 9f951a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 50 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"@redhat-cloud-services/frontend-components": "^4.2.11",
"@redhat-cloud-services/frontend-components-notifications": "^4.1.0",
"@redhat-cloud-services/frontend-components-pdf-generator": "4.0.5",
"@redhat-cloud-services/frontend-components-utilities": "^4.0.13",
"@redhat-cloud-services/frontend-components-utilities": "^4.0.14",
"@redhat-cloud-services/host-inventory-client": "1.2.0",
"@redhat-cloud-services/rbac-client": "1.2.0",
"@scalprum/core": "^0.7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import chromeStore from './state/chromeStore';
import { GenerateId } from '@patternfly/react-core/dist/dynamic/helpers/GenerateId/GenerateId';
import { isPreviewAtom } from './state/atoms/releaseAtom';
import AppPlaceholder from './components/AppPlaceholder';
import useAsyncLoader from './hooks/useAsyncLoader';
import { ChromeUserConfig, initChromeUserConfig } from './utils/initUserConfig';
import ChromeAuthContext from './auth/ChromeAuthContext';
import useSuspenseLoader from '@redhat-cloud-services/frontend-components-utilities/useSuspenseLoader/useSuspenseLoader';

const isITLessEnv = ITLess();
const language: keyof typeof messages = 'en';
Expand Down Expand Up @@ -68,7 +68,7 @@ const ConfigLoader = () => {
function initFail() {
initPreview(false);
}
const { loader } = useAsyncLoader(initChromeUserConfig, initSuccess, initFail);
const { loader } = useSuspenseLoader(initChromeUserConfig, initSuccess, initFail);
const [cookieElement, setCookieElement] = useState<HTMLAnchorElement | null>(null);
return (
<Suspense fallback={<AppPlaceholder cookieElement={cookieElement} setCookieElement={setCookieElement} />}>
Expand Down
43 changes: 0 additions & 43 deletions src/hooks/useAsyncLoader.ts

This file was deleted.

0 comments on commit 9f951a6

Please sign in to comment.