diff --git a/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.test.tsx b/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.test.tsx deleted file mode 100644 index f9d46b73e7f..00000000000 --- a/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.test.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import { AltinnContentLoader } from './AltinnContentLoader'; - -describe('AltinnContentLoader', () => { - it('should render with default height and width', () => { - render(); - - const loader = screen.getByRole('img', { hidden: true }); - expect(loader).toHaveAttribute('height', '200'); - expect(loader).toHaveAttribute('width', '400'); - }); - - it('should render with custom height and width', () => { - render(); - - const loader = screen.getByRole('img', { hidden: true }); - expect(loader).toHaveAttribute('height', '300'); - expect(loader).toHaveAttribute('width', '500'); - }); - - it('should render children', () => { - render( - - - , - ); - expect(screen.getByRole('img')).toBeInTheDocument(); - }); -}); diff --git a/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.tsx b/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.tsx deleted file mode 100644 index 35a7a1a6519..00000000000 --- a/frontend/app-development/features/appPublish/components/AltinnContentLoader/AltinnContentLoader.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React, { type ReactElement } from 'react'; -import type { IContentLoaderProps } from 'react-content-loader'; -import ContentLoader from 'react-content-loader'; - -export const AltinnContentLoader = ({ - height, - width, - children, - ...rest -}: IContentLoaderProps): ReactElement => { - return ( - - {children} - - ); -}; diff --git a/frontend/app-development/features/appPublish/components/AltinnContentLoader/index.ts b/frontend/app-development/features/appPublish/components/AltinnContentLoader/index.ts deleted file mode 100644 index 044a090f353..00000000000 --- a/frontend/app-development/features/appPublish/components/AltinnContentLoader/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AltinnContentLoader } from './AltinnContentLoader'; diff --git a/frontend/app-development/features/appPublish/containers/DeploymentContainer.tsx b/frontend/app-development/features/appPublish/containers/DeploymentContainer.tsx index 2044105fd6a..8b3958b3b84 100644 --- a/frontend/app-development/features/appPublish/containers/DeploymentContainer.tsx +++ b/frontend/app-development/features/appPublish/containers/DeploymentContainer.tsx @@ -1,6 +1,5 @@ import React, { useMemo } from 'react'; import classes from './DeploymentContainer.module.css'; -import { AltinnContentLoader } from '../components/AltinnContentLoader'; import { useOrgListQuery, useEnvironmentsQuery, @@ -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(); @@ -45,12 +44,7 @@ export const DeploymentContainer = () => { if (environmentListIsPending || orgsIsPending || appDeploymentIsPending) { return (
- - - - - - +
); } diff --git a/frontend/app-development/features/appPublish/pages/DeployPage.tsx b/frontend/app-development/features/appPublish/pages/DeployPage.tsx index 060424df6c6..3cba4aa6ab2 100644 --- a/frontend/app-development/features/appPublish/pages/DeployPage.tsx +++ b/frontend/app-development/features/appPublish/pages/DeployPage.tsx @@ -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(); @@ -25,13 +24,7 @@ export function DeployPage() { useInvalidator(); if (orgsIsPending || permissionsIsPending) { - return ( - - - - - - ); + return ; } if (orgsIsError || permissionsIsError) diff --git a/frontend/packages/shared/package.json b/frontend/packages/shared/package.json index f6548abf775..fa1803bc6a7 100644 --- a/frontend/packages/shared/package.json +++ b/frontend/packages/shared/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 44a03132739..5b3c8328159 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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"