- Introduced a new service for scheduling-remote in docker-compose.yml, allowing for better management of scheduling functionalities. - Enhanced error handling in CameraMonitor and CameraStreamer classes to improve robustness during camera initialization and streaming processes. - Updated various components in the management dashboard to support dark mode and improve user experience with consistent styling. - Implemented feature flags for enabling/disabling modules, including the new scheduling module.
30 lines
873 B
TypeScript
30 lines
873 B
TypeScript
import React from 'react'
|
|
import { Scheduling } from './components/Scheduling'
|
|
import type { User } from './services/supabase'
|
|
|
|
interface AppProps {
|
|
user?: User
|
|
currentRoute?: string
|
|
}
|
|
|
|
export default function App(props: AppProps) {
|
|
// Get user and route from props or try to get from window (for standalone testing)
|
|
const user = props.user || (window as any).__SCHEDULING_USER__
|
|
const currentRoute = props.currentRoute || window.location.pathname
|
|
|
|
if (!user) {
|
|
return (
|
|
<div className="p-6">
|
|
<div className="bg-yellow-50 border border-yellow-200 rounded-md p-4">
|
|
<div className="text-sm text-yellow-700">
|
|
User information is required to use the scheduling module. Please ensure you are logged in.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
return <Scheduling user={user} currentRoute={currentRoute} />
|
|
}
|
|
|