mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-07 07:19:16 +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>
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import { memo } from 'react';
|
|
|
|
import * as Editor from '../../../common/components/editor-utils/EditorUtils';
|
|
import ErrorBoundary from '../../../common/components/error-boundary/ErrorBoundary';
|
|
import ViewNavigationMenu from '../../../common/components/navigation-menu/ViewNavigationMenu';
|
|
import ProtectRoute from '../../../common/components/protect-route/ProtectRoute';
|
|
import { handleLinks } from '../../../common/utils/linkUtils';
|
|
import { getIsNavigationLocked } from '../../../externals';
|
|
import MessageControl from './MessageControl';
|
|
|
|
import style from './MessageControlExport.module.scss';
|
|
|
|
export default memo(MessageControlExport);
|
|
function MessageControlExport() {
|
|
const isExtracted = window.location.pathname.includes('/messagecontrol');
|
|
|
|
return (
|
|
<ProtectRoute permission='editor'>
|
|
<Editor.Panel className={style.growPanel} data-testid='panel-messages-control'>
|
|
{!isExtracted && <Editor.CornerExtract onClick={(event) => handleLinks('messagecontrol', event)} />}
|
|
{isExtracted && <ViewNavigationMenu suppressSettings isNavigationLocked={getIsNavigationLocked()} />}
|
|
|
|
<div className={style.contentLayout}>
|
|
<ErrorBoundary>
|
|
<MessageControl />
|
|
</ErrorBoundary>
|
|
</div>
|
|
</Editor.Panel>
|
|
</ProtectRoute>
|
|
);
|
|
}
|