Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/app/router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import { useSelector } from 'react-redux';
import { ChatLayout } from '../features/chat/components/ChatLayout';
import { SharedSessionView } from '../features/chat/components/SharedSessionView';
import { PrivacyPolicyPage, TermsOfServicePage } from '../features/legal/components';
import { MaintenancePage } from '../features/legal/components/MaintenancePage';
import { AsrLayout } from '../features/asr/components/AsrLayout';
import { TtsLayout } from '../features/tts/components/TtsLayout';
import { TtsAcademicLayout } from '../features/tts/components/TtsAcademicLayout';
import { useTenant } from '../shared/context/TenantContext';

const MAINTENANCE_MODE = true;

// Wrapper that extracts tenant from URL and sets context
function TenantRoute({ children }) {
const { tenant } = useParams();
Expand All @@ -25,6 +28,16 @@ function TenantRoute({ children }) {
}

export function AppRouter() {
if (MAINTENANCE_MODE) {
return (
<Routes>
<Route path="/privacy" element={<PrivacyPolicyPage />} />
<Route path="/terms" element={<TermsOfServicePage />} />
<Route path="*" element={<MaintenancePage />} />
</Routes>
);
}

return (
<Routes>
<Route path="/chat" element={<ChatLayout />} />
Expand Down
2 changes: 1 addition & 1 deletion src/features/legal/components/MaintenancePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const MaintenancePage = () => {
<div className="bg-gray-50 rounded-lg p-4">
<Clock className="text-blue-600 w-8 h-8 mx-auto mb-2" />
<h3 className="font-semibold text-gray-900 mb-1">Estimated Time</h3>
<p className="text-sm text-gray-600">15-30 minutes</p>
<p className="text-sm text-gray-600">We'll be back shortly</p>
</div>

<div className="bg-gray-50 rounded-lg p-4">
Expand Down
Loading