refactor: gather group metadata

This commit is contained in:
Carlos Valente
2025-03-28 19:16:38 +01:00
committed by Carlos Valente
parent 730cb95c04
commit 876d111c61
48 changed files with 1044 additions and 751 deletions
@@ -10,12 +10,13 @@ import style from './QuickAddBlock.module.scss';
interface QuickAddBlockProps {
previousEventId: MaybeString;
showBlocks?: boolean;
}
export default memo(QuickAddBlock);
function QuickAddBlock(props: QuickAddBlockProps) {
const { previousEventId } = props;
const { previousEventId, showBlocks } = props;
const { addEvent } = useEventAction();
const { emitError } = useEmitLog();
@@ -86,16 +87,18 @@ function QuickAddBlock(props: QuickAddBlockProps) {
>
Delay
</Button>
<Button
onClick={() => handleCreateEvent(SupportedEvent.Block)}
size='xs'
variant='ontime-subtle-white'
className={style.quickBtn}
leftIcon={<IoAdd />}
color='#b1b1b1' // $gray-400
>
Block
</Button>
{showBlocks && (
<Button
onClick={() => handleCreateEvent(SupportedEvent.Block)}
size='xs'
variant='ontime-subtle-white'
className={style.quickBtn}
leftIcon={<IoAdd />}
color='#b1b1b1' // $gray-400
>
Block
</Button>
)}
</div>
);
}