Skip to content

Commit

Permalink
Replace AltinnContentLoader with StudioSpinner and delete react-conte…
Browse files Browse the repository at this point in the history
…nt-loader dependency
  • Loading branch information
standeren committed Oct 31, 2024
1 parent fad4b91 commit a64a53b
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 75 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useMemo } from 'react';
import classes from './DeploymentContainer.module.css';
import { AltinnContentLoader } from '../components/AltinnContentLoader';
import {
useOrgListQuery,
useEnvironmentsQuery,
Expand All @@ -12,7 +11,7 @@ import { DeploymentEnvironment } from '../components/DeploymentEnvironment';
import { getAppLink } from 'app-shared/ext-urls';
import { useTranslation } from 'react-i18next';
import { PROD_ENV_TYPE } from 'app-shared/constants';
import { StudioError } from '@studio/components';
import { StudioError, StudioPageSpinner } from '@studio/components';

export const DeploymentContainer = () => {
const { org, app } = useStudioEnvironmentParams();
Expand Down Expand Up @@ -45,12 +44,7 @@ export const DeploymentContainer = () => {
if (environmentListIsPending || orgsIsPending || appDeploymentIsPending) {
return (
<div className={classes.deployContainer}>
<AltinnContentLoader width={900} height={320} title={t('app_deployment.loading')}>
<rect x='60' y='13' rx='0' ry='0' width='650' height='76' />
<rect x='60' y='110' rx='0' ry='0' width='333' height='44' />
<rect x='60' y='171' rx='0' ry='0' width='202' height='41' />
<rect x='487' y='111' rx='0' ry='0' width='220' height='42' />
</AltinnContentLoader>
<StudioPageSpinner spinnerTitle={t('app_deployment.loading')} />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import { InfoCard } from '../components/InfoCard';
import { ReleaseContainer } from '../containers/ReleaseContainer';
import { useDeployPermissionsQuery, useOrgListQuery } from '../../../hooks/queries';
import { Trans, useTranslation } from 'react-i18next';
import { AltinnContentLoader } from '../components/AltinnContentLoader';
import { useInvalidator } from '../../../hooks/useInvalidator';
import { useStudioEnvironmentParams } from 'app-shared/hooks/useStudioEnvironmentParams';
import { Link } from '@digdir/designsystemet-react';
import { EmailContactProvider } from 'app-shared/getInTouch/providers';
import { GetInTouchWith } from 'app-shared/getInTouch';
import { StudioError } from '@studio/components';
import { StudioError, StudioPageSpinner } from '@studio/components';

export function DeployPage() {
const { org, app } = useStudioEnvironmentParams();
Expand All @@ -25,13 +24,7 @@ export function DeployPage() {
useInvalidator();

if (orgsIsPending || permissionsIsPending) {
return (
<AltinnContentLoader width={1200} height={600} title={t('app_deployment.loading')}>
<rect x='862' y='3' rx='0' ry='0' width='300' height='600' />
<rect x='1' y='1' rx='0' ry='0' width='800' height='200' />
<rect x='1' y='220' rx='0' ry='0' width='800' height='200' />
</AltinnContentLoader>
);
return <StudioPageSpinner spinnerTitle={t('app_deployment.loading')} />;
}

if (orgsIsError || permissionsIsError)
Expand Down
1 change: 0 additions & 1 deletion frontend/packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"classnames": "2.5.1",
"qs": "6.13.0",
"react": "18.3.1",
"react-content-loader": "7.0.2",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "18.3.1",
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6605,7 +6605,6 @@ __metadata:
jest: "npm:29.7.0"
qs: "npm:6.13.0"
react: "npm:18.3.1"
react-content-loader: "npm:7.0.2"
react-dnd: "npm:16.0.1"
react-dnd-html5-backend: "npm:16.0.1"
react-dom: "npm:18.3.1"
Expand Down Expand Up @@ -15740,15 +15739,6 @@ __metadata:
languageName: node
linkType: hard

"react-content-loader@npm:7.0.2":
version: 7.0.2
resolution: "react-content-loader@npm:7.0.2"
peerDependencies:
react: ">=16.0.0"
checksum: 10/8f7d7b84a50cfc6a7595fb858ccf9b801a80ccf764a07af0434da6ba9b06d8f64e21d77821ba6699f6cb9edde1fa670fd00ebd023f12c8dd245f8833aa12e245
languageName: node
linkType: hard

"react-dnd-html5-backend@npm:16.0.1":
version: 16.0.1
resolution: "react-dnd-html5-backend@npm:16.0.1"
Expand Down

0 comments on commit a64a53b

Please sign in to comment.