Skip to content

Commit

Permalink
(enhc) Update the loading widget to make it snappier when showing loa…
Browse files Browse the repository at this point in the history
…ding spinner (#58)
  • Loading branch information
donaldkibet authored Nov 18, 2023
1 parent 4c76e42 commit 37a43fe
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useMemo, useState } from 'react';
import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { StructuredListSkeleton, ContentSwitcher, Switch, InlineLoading } from '@carbon/react';
import { StructuredListSkeleton, ContentSwitcher, Switch } from '@carbon/react';
import styles from './care-panel.scss';
import { useEnrollmentHistory } from '../hooks/useEnrollmentHistory';
import ProgramSummary from '../program-summary/program-summary.component';
Expand Down Expand Up @@ -35,7 +35,11 @@ const CarePanel: React.FC<CarePanelProps> = ({ patientUuid, formEntrySub, launch
);

if (isLoading) {
return <StructuredListSkeleton role="progressbar" />;
return (
<div className={styles.widgetCard}>
<StructuredListSkeleton role="progressbar" />
</div>
);
}

if (error) {
Expand Down

0 comments on commit 37a43fe

Please sign in to comment.