padhle - post migration
This commit is contained in:
+11
-1
@@ -4,6 +4,7 @@
|
||||
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||
import App from "./App.jsx";
|
||||
import { AuthProvider } from "./lib/auth/SupabaseAuth.jsx";
|
||||
import "./styles/global.css";
|
||||
@@ -11,7 +12,16 @@ import "./styles/global.css";
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||
<React.StrictMode>
|
||||
<AuthProvider>
|
||||
<App />
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
{/* Both paths render the same App shell; the chat id is read via
|
||||
useParams() to support deep links like /chat/:chatId. A catch-all
|
||||
keeps unknown paths on the app (Vite SPA fallback serves index.html). */}
|
||||
<Route path="/" element={<App />} />
|
||||
<Route path="/chat/:chatId" element={<App />} />
|
||||
<Route path="*" element={<App />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</AuthProvider>
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user