mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-07 23:39:09 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { PropsWithChildren, memo } from 'react';
|
|
|
|
import { useIsMobileScreen } from '../../common/hooks/useIsMobileScreen';
|
|
import {
|
|
ClockOverview,
|
|
MetadataTimes,
|
|
OffsetOverview,
|
|
StartTimesRuntime,
|
|
TimerOverview,
|
|
} from './composite/TimeElements';
|
|
import TitleOverview from './composite/TitleOverview';
|
|
import { OverviewWrapper } from './OverviewWrapper';
|
|
|
|
export default memo(CuesheetOverview);
|
|
function CuesheetOverview({ children }: PropsWithChildren) {
|
|
const isMobileScreen = useIsMobileScreen();
|
|
|
|
if (isMobileScreen) {
|
|
return <CuesheetMobile>{children}</CuesheetMobile>;
|
|
}
|
|
return <CuesheetDesktop>{children}</CuesheetDesktop>;
|
|
}
|
|
|
|
function CuesheetMobile({ children }: PropsWithChildren) {
|
|
return (
|
|
<OverviewWrapper navElements={children}>
|
|
<TimerOverview />
|
|
<OffsetOverview />
|
|
</OverviewWrapper>
|
|
);
|
|
}
|
|
|
|
function CuesheetDesktop({ children }: PropsWithChildren) {
|
|
return (
|
|
<OverviewWrapper navElements={children}>
|
|
<TitleOverview />
|
|
<StartTimesRuntime shouldFormat />
|
|
<TimerOverview />
|
|
<OffsetOverview />
|
|
<MetadataTimes />
|
|
<ClockOverview shouldFormat />
|
|
</OverviewWrapper>
|
|
);
|
|
}
|