mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 14:14:17 +00:00
refactor: restructure element composition
This commit is contained in:
committed by
Carlos Valente
parent
67fa747aae
commit
8f30c0a7df
@@ -0,0 +1,27 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
import { useCurrentBlockId } from '../../../../common/hooks/useSocket';
|
||||
|
||||
import style from '../CuesheetTable.module.scss';
|
||||
|
||||
interface BlockRowProps {
|
||||
hidePast: boolean;
|
||||
title: string;
|
||||
}
|
||||
|
||||
function BlockRow(props: BlockRowProps) {
|
||||
const { hidePast, title } = props;
|
||||
const { currentBlockId } = useCurrentBlockId();
|
||||
|
||||
if (hidePast && !currentBlockId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<tr className={style.blockRow}>
|
||||
<td>{title}</td>
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(BlockRow);
|
||||
Reference in New Issue
Block a user