refactor: make operator block component

This commit is contained in:
arihanv
2023-07-02 18:11:50 -05:00
parent 9e9d9eedaf
commit 7a6158584a
5 changed files with 1915 additions and 1786 deletions
@@ -2,10 +2,8 @@
.operator { .operator {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: white;
padding: 2rem; padding: 2rem;
font-size: 0.8rem; font-size: 0.8rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2px; gap: 2px;
@@ -4,6 +4,8 @@ import useRundown from '../../common/hooks-query/useRundown';
import style from './Operator.module.scss'; import style from './Operator.module.scss';
import OpBlock from './op-block/OpBlock';
export default function Operator() { export default function Operator() {
// this is the data that you need, the status flag should give you possibility to create a loading state // this is the data that you need, the status flag should give you possibility to create a loading state
// for debugging data use the react query dev tools (flower thing in the bottom left corner) // for debugging data use the react query dev tools (flower thing in the bottom left corner)
@@ -23,7 +25,7 @@ export default function Operator() {
if (entry.type === SupportedEvent.Event) { if (entry.type === SupportedEvent.Event) {
return ( return (
<div key={entry.id} className={style.scheduledEvent}> <div key={entry.id} className={style.scheduledEvent}>
{JSON.stringify(entry, null, 2)} <OpBlock entry={JSON.stringify(entry, null, 2)} />
</div> </div>
); );
} }
@@ -32,7 +34,8 @@ export default function Operator() {
if (entry.type === SupportedEvent.Block) { if (entry.type === SupportedEvent.Block) {
return ( return (
<div key={entry.id} className={style.block}> <div key={entry.id} className={style.block}>
{JSON.stringify(entry, null, 2)} {/* {JSON.stringify(entry, null, 2)} */}
<OpBlock entry={JSON.stringify(entry, null, 2)} />
</div> </div>
); );
} }
@@ -0,0 +1,11 @@
import style from './OpBlock.module.scss';
type Props = {
entry: string;
}
export default function OpBlock({entry}: Props) {
return (
<div>OpBlock</div>
)
}
+1899 -1782
View File
File diff suppressed because it is too large Load Diff