Files
ontime/apps/client/src/features/info/Info.tsx
T
Carlos Valente 82ac8f1ba5 style v2 tweaks (#415)
* fix: reset rundown on upload

* style: facilitate reaching event id

* fix: show rundown on half screens

* style: prevent tab overflow

* style: remove redundant information

* style: improve editor in small screens

* style: small tweaks to editor sizes
2023-05-26 13:18:44 +02:00

53 lines
1.4 KiB
TypeScript

import { useInfoPanel } from '../../common/hooks/useSocket';
import CollapsableInfo from './CollapsableInfo';
import InfoLogger from './InfoLogger';
import InfoNif from './InfoNif';
import InfoTitles from './InfoTitles';
import style from './Info.module.scss';
export default function Info() {
const data = useInfoPanel();
const titlesNow = {
title: data.titles.titleNow || '',
subtitle: data.titles.subtitleNow || '',
presenter: data.titles.presenterNow || '',
note: data.titles.noteNow || '',
};
const titlesNext = {
title: data.titles.titleNext || '',
subtitle: data.titles.subtitleNext || '',
presenter: data.titles.presenterNext || '',
note: data.titles.noteNext || '',
};
const selected = !data.numEvents
? 'No events'
: `Event ${data.selectedEventIndex !== null ? data.selectedEventIndex + 1 : '-'} / ${
data.numEvents ? data.numEvents : '-'
}`;
return (
<>
<div className={style.panelHeader}>
<span>{selected}</span>
</div>
<CollapsableInfo title='Network Info'>
<InfoNif />
</CollapsableInfo>
<CollapsableInfo title='Playing Now'>
<InfoTitles data={titlesNow} />
</CollapsableInfo>
<CollapsableInfo title='Playing Next'>
<InfoTitles data={titlesNext} />
</CollapsableInfo>
<CollapsableInfo title='Log'>
<InfoLogger />
</CollapsableInfo>
</>
);
}