Skip to content

Commit

Permalink
refactor: improve empty state for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cpvalente committed Dec 14, 2024
1 parent d46dfcf commit 43347b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/client/src/features/operator/Operator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSearchParams } from 'react-router-dom';
import { isOntimeEvent, OntimeEvent, SupportedEvent } from 'ontime-types';
import { getFirstEventNormal, getLastEventNormal } from 'ontime-utils';

import Empty from '../../common/components/state/Empty';
import EmptyPage from '../../common/components/state/EmptyPage';
import ViewParamsEditor from '../../common/components/view-params-editor/ViewParamsEditor';
import useFollowComponent from '../../common/hooks/useFollowComponent';
import { useOperator } from '../../common/hooks/useSocket';
Expand Down Expand Up @@ -108,7 +108,7 @@ export default function Operator() {
const isLoading = status === 'pending' || customFieldStatus === 'pending' || projectDataStatus === 'pending';

if (missingData || isLoading) {
return <Empty text='Loading...' />;
return <EmptyPage text='Loading...' />;
}

// get fields which the user subscribed to
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/views/cuesheet/CuesheetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IoSettingsOutline } from '@react-icons/all-files/io5/IoSettingsOutline'
import { CustomFieldLabel, isOntimeEvent } from 'ontime-types';

import ProductionNavigationMenu from '../../common/components/navigation-menu/ProductionNavigationMenu';
import Empty from '../../common/components/state/Empty';
import EmptyPage from '../../common/components/state/EmptyPage';
import { useEventAction } from '../../common/hooks/useEventAction';
import { useCuesheet } from '../../common/hooks/useSocket';
import { useWindowTitle } from '../../common/hooks/useWindowTitle';
Expand Down Expand Up @@ -79,7 +79,7 @@ export default function CuesheetPage() {
);

if (!customFields || !flatRundown || rundownStatus !== 'success') {
return <Empty text='Loading...' />;
return <EmptyPage text='Loading...' />;
}

return (
Expand Down

0 comments on commit 43347b5

Please sign in to comment.