import React from 'react'; import { Navigate, Route } from 'react-router-dom'; import { useClientPath } from './common/hooks/useClientPath'; import Log from './features/log/Log'; import withPreset from './features/PresetWrapper'; import withData from './features/viewers/ViewWrapper'; import ViewLoader from './views/ViewLoader'; import { initializeSentry } from './sentry.config'; const Editor = React.lazy(() => import('./views/editor/ProtectedEditor')); const Cuesheet = React.lazy(() => import('./views/cuesheet/ProtectedCuesheet')); const Operator = React.lazy(() => import('./features/operator/OperatorExport')); const TimerView = React.lazy(() => import('./views/timer/Timer')); const Countdown = React.lazy(() => import('./views/countdown/Countdown')); const Backstage = React.lazy(() => import('./views/backstage/Backstage')); const Timeline = React.lazy(() => import('./views/timeline/TimelinePage')); const StudioClock = React.lazy(() => import('./views/studio/Studio')); const ProjectInfo = React.lazy(() => import('./views/project-info/ProjectInfo')); const STimer = withPreset(withData(TimerView)); const SCountdown = withPreset(withData(Countdown)); const SBackstage = withPreset(withData(Backstage)); const SProjectInfo = withPreset(ProjectInfo); // NOTE: ProjectInfo does not use the viewWrapper since it has no options const SStudio = withPreset(withData(StudioClock)); const STimeline = withPreset(withData(Timeline)); const PCuesheet = withPreset(Cuesheet); const POperator = withPreset(Operator); const EditorFeatureWrapper = React.lazy(() => import('./features/EditorFeatureWrapper')); const RundownPanel = React.lazy(() => import('./features/rundown/RundownExport')); const TimerControl = React.lazy(() => import('./features/control/playback/TimerControlExport')); const MessageControl = React.lazy(() => import('./features/control/message/MessageControlExport')); // Initialize Sentry with our configuration const SentryRouter = initializeSentry(); export default function AppRouter() { // handle client path changes useClientPath(); return ( } /> } /> } /> } /> } /> } /> } /> {/*/!* Protected Routes *!/*/} } /> } /> } /> {/*/!* Protected Routes - Elements *!/*/} } /> } /> } /> } /> {/*/!* Send to default if nothing found *!/*/} } /> ); }