expand / collapse

This commit is contained in:
cv
2021-06-13 12:39:24 +02:00
parent df44d3fcbc
commit f066e974e6
4 changed files with 58 additions and 40 deletions
+6 -5
View File
@@ -37,9 +37,9 @@ export default function Info() {
// Handle selection data
socket.on('selected', (data) => {
const formatedCurrent = `${data.index != null ? data.index + 1 : '-'}/${
data.total != null ? data.total : '-'
}`;
const formatedCurrent = `Event ${
data.index != null ? data.index + 1 : '-'
}/${data.total != null ? data.total : '-'}`;
setSelected(formatedCurrent);
});
@@ -51,6 +51,7 @@ export default function Info() {
};
}, [socket]);
// TODO: Put this in use effect
// prepare data
const titlesNow = {
title: titles.titleNow,
@@ -68,10 +69,10 @@ export default function Info() {
return (
<>
<div className={style.main}>{`Event ${selected}`}</div>
<div className={style.main}>{selected}</div>
<InfoLogger logData={logData} />
<InfoTitle title={'Now'} data={titlesNow} />
<InfoTitle title={'Next'} data={titlesNext} />
<InfoLogger logData={logData} />
</>
);
}