diff --git a/apps/client/src/common/components/state/Empty.module.scss b/apps/client/src/common/components/state/Empty.module.scss index 9f0e9436f..f9c4ac1fc 100644 --- a/apps/client/src/common/components/state/Empty.module.scss +++ b/apps/client/src/common/components/state/Empty.module.scss @@ -9,7 +9,10 @@ } .text { + display: block; + margin-inline: auto;; font-weight: 600; font-size: 2em; + max-width: 600px; } } diff --git a/apps/client/src/common/components/state/Empty.tsx b/apps/client/src/common/components/state/Empty.tsx index 11299a381..0e88e2868 100644 --- a/apps/client/src/common/components/state/Empty.tsx +++ b/apps/client/src/common/components/state/Empty.tsx @@ -7,13 +7,13 @@ import style from './Empty.module.scss'; interface EmptyProps { text?: string; - style?: CSSProperties; + injectedStyles?: CSSProperties; className?: string; } -export default function Empty({ text, className, ...rest }: EmptyProps) { +export default function Empty({ text, className, injectedStyles }: EmptyProps) { return ( -
+
{text && {text}}
diff --git a/apps/client/src/common/components/state/EmptyPage.tsx b/apps/client/src/common/components/state/EmptyPage.tsx index 4bfc3f37e..b589989e5 100644 --- a/apps/client/src/common/components/state/EmptyPage.tsx +++ b/apps/client/src/common/components/state/EmptyPage.tsx @@ -6,15 +6,13 @@ import style from './EmptyPage.module.scss'; interface EmptyPageProps { text?: string; - style?: CSSProperties; + injectedStyles?: CSSProperties; } -export default function EmptyPage(props: EmptyPageProps) { - const { text, ...rest } = props; - +export default function EmptyPage({ text, injectedStyles }: EmptyPageProps) { return (
- +
); } diff --git a/apps/client/src/common/hooks-query/useViewSettings.ts b/apps/client/src/common/hooks-query/useViewSettings.ts index 8da03e1c0..882b08482 100644 --- a/apps/client/src/common/hooks-query/useViewSettings.ts +++ b/apps/client/src/common/hooks-query/useViewSettings.ts @@ -7,7 +7,7 @@ import { VIEW_SETTINGS } from '../api/constants'; import { viewsSettingsPlaceholder } from '../models/ViewSettings.type'; export default function useViewSettings() { - const { data, isPending } = useQuery({ + const { data, status } = useQuery({ queryKey: VIEW_SETTINGS, queryFn: getViewSettings, placeholderData: (previousData, _previousQuery) => previousData, @@ -24,5 +24,5 @@ export default function useViewSettings() { }, }); - return { data: data ?? viewsSettingsPlaceholder, mutateAsync, isPending }; + return { data: data ?? viewsSettingsPlaceholder, status, mutateAsync }; } diff --git a/apps/client/src/features/app-settings/panel/settings-panel/ViewSettings.tsx b/apps/client/src/features/app-settings/panel/settings-panel/ViewSettings.tsx index 5fced34c4..c6542adff 100644 --- a/apps/client/src/features/app-settings/panel/settings-panel/ViewSettings.tsx +++ b/apps/client/src/features/app-settings/panel/settings-panel/ViewSettings.tsx @@ -18,7 +18,7 @@ import CodeEditorModal from './composite/StyleEditorModal'; const cssOverrideDocsUrl = 'https://docs.getontime.no/features/custom-styling/'; export default function ViewSettings() { - const { data, isPending, mutateAsync } = useViewSettings(); + const { data, status, mutateAsync } = useViewSettings(); const [isCodeEditorOpen, codeEditorHandler] = useDisclosure(); const { @@ -87,7 +87,7 @@ export default function ViewSettings() { See the docs - + {errors.root?.message} diff --git a/apps/client/src/features/rundown/RundownEmpty.tsx b/apps/client/src/features/rundown/RundownEmpty.tsx index 3620432c3..5b7dd551f 100644 --- a/apps/client/src/features/rundown/RundownEmpty.tsx +++ b/apps/client/src/features/rundown/RundownEmpty.tsx @@ -16,7 +16,7 @@ export default function RundownEmpty(props: RundownEmptyProps) { return (
- +