mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
Revert "feat: display offline indicators in all views"
This reverts commit 71b2fa8e21.
This commit is contained in:
committed by
Carlos Valente
parent
1054ec0a5e
commit
1d7ee163a0
@@ -2,18 +2,13 @@ import { PropsWithChildren } from 'react';
|
||||
|
||||
import { overrideStylesURL } from '../common/api/constants';
|
||||
import { useRuntimeStylesheet } from '../common/hooks/useRuntimeStylesheet';
|
||||
import { useIsOnline } from '../common/hooks/useSocket';
|
||||
import useViewSettings from '../common/hooks-query/useViewSettings';
|
||||
import { cx } from '../common/utils/styleUtils';
|
||||
|
||||
import Loader from './common/loader/Loader';
|
||||
|
||||
import style from './ViewLoader.module.scss';
|
||||
|
||||
export default function ViewLoader({ children }: PropsWithChildren) {
|
||||
const { data } = useViewSettings();
|
||||
const { shouldRender } = useRuntimeStylesheet(data.overrideStyles ? overrideStylesURL : undefined);
|
||||
const { isOnline } = useIsOnline();
|
||||
|
||||
// eventually we would want to leverage suspense here
|
||||
// while the feature is not ready, we simply trigger a loader
|
||||
@@ -23,5 +18,6 @@ export default function ViewLoader({ children }: PropsWithChildren) {
|
||||
return <Loader />;
|
||||
}
|
||||
|
||||
return <div className={cx([style.viewLoader, !isOnline && style.isOffline])}>{children}</div>;
|
||||
// eslint-disable-next-line react/jsx-no-useless-fragment -- ensuring JSX return
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user