From 67f914bdc0536aa4e68ec076ea825b2e058e0241 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Sat, 17 May 2025 14:58:46 +0200 Subject: [PATCH] feat: create block from rundown empty --- .../src/features/rundown/Empty.module.scss | 7 +++++++ apps/client/src/features/rundown/Rundown.tsx | 2 +- .../src/features/rundown/RundownEmpty.tsx | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/apps/client/src/features/rundown/Empty.module.scss b/apps/client/src/features/rundown/Empty.module.scss index 7ed3e524c..50b47082b 100644 --- a/apps/client/src/features/rundown/Empty.module.scss +++ b/apps/client/src/features/rundown/Empty.module.scss @@ -2,3 +2,10 @@ padding-block: 1.5rem; text-align: center; } + +.inline { + display: flex; + align-items: center; + justify-content: center; + gap: 2rem; +} diff --git a/apps/client/src/features/rundown/Rundown.tsx b/apps/client/src/features/rundown/Rundown.tsx index 4d56e8876..cb768f0c6 100644 --- a/apps/client/src/features/rundown/Rundown.tsx +++ b/apps/client/src/features/rundown/Rundown.tsx @@ -329,7 +329,7 @@ export default function Rundown({ data }: RundownProps) { }; if (sortableData.length < 1) { - return insertAtId({ type: SupportedEntry.Event }, cursor)} />; + return insertAtId({ type }, cursor)} />; } // 1. gather presentation options diff --git a/apps/client/src/features/rundown/RundownEmpty.tsx b/apps/client/src/features/rundown/RundownEmpty.tsx index 6ce8cb5b1..8f5d14fe0 100644 --- a/apps/client/src/features/rundown/RundownEmpty.tsx +++ b/apps/client/src/features/rundown/RundownEmpty.tsx @@ -1,12 +1,13 @@ import { IoAdd } from 'react-icons/io5'; import { Button } from '@chakra-ui/react'; +import { SupportedEntry } from 'ontime-types'; import Empty from '../../common/components/state/Empty'; import style from './Empty.module.scss'; interface RundownEmptyProps { - handleAddNew: () => void; + handleAddNew: (type: SupportedEntry) => void; } export default function RundownEmpty(props: RundownEmptyProps) { @@ -14,10 +15,16 @@ export default function RundownEmpty(props: RundownEmptyProps) { return (
- - + +
+ + + +
); }