Implement chat backend and frontend scaffolding
Expanded chat backend with message reply, edit, delete, and reaction support in consumers and models. Updated routing to use chat_id. Added chat-related view stubs. On the frontend, introduced ChatLayout and ChatPage scaffolding, and routed protected routes through ChatLayout.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||
import Home from "./pages/home/home";
|
||||
import HomeLayout from "./layouts/HomeLayout";
|
||||
import ChatLayout from "./layouts/ChatLayout";
|
||||
|
||||
import Downloader from "./pages/downloader/Downloader";
|
||||
import PrivateRoute from "./routes/PrivateRoute";
|
||||
import Home from "./pages/home/home";
|
||||
import DroneServisSection from "./pages/home/components/Services/droneServis";
|
||||
|
||||
|
||||
import PrivateRoute from "./routes/PrivateRoute";
|
||||
|
||||
//import { UserContextProvider } from "./context/UserContext";
|
||||
|
||||
// Pages
|
||||
@@ -36,9 +40,10 @@ export default function App() {
|
||||
|
||||
{/* Example protected route group (kept for future use) */}
|
||||
<Route element={<PrivateRoute />}>
|
||||
<Route path="/" element={<HomeLayout />}>
|
||||
<Route path="protected-downloader" element={<Downloader />} />
|
||||
<Route path="/" element={<ChatLayout />}>
|
||||
|
||||
</Route>
|
||||
|
||||
</Route>
|
||||
</Routes>
|
||||
{/* </UserContextProvider> */}
|
||||
|
||||
21
frontend/src/layouts/ChatLayout.tsx
Normal file
21
frontend/src/layouts/ChatLayout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import Footer from "../components/Footer/footer";
|
||||
import { Outlet } from "react-router";
|
||||
import SiteNav, { type User } from "../components/navbar/SiteNav";
|
||||
|
||||
|
||||
const userexists: User = {
|
||||
username: "Bruno",
|
||||
email: "",
|
||||
avatarUrl: "",
|
||||
};
|
||||
|
||||
import styles from "./HomeLayout.module.css";
|
||||
|
||||
export default function ChatLayout(){
|
||||
return(
|
||||
<div className={styles.root}>
|
||||
<SiteNav user={userexists} onLogin={() => {}} onLogout={() => {}} />
|
||||
<Outlet />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
0
frontend/src/pages/Chat/ChatPage.tsx
Normal file
0
frontend/src/pages/Chat/ChatPage.tsx
Normal file
Reference in New Issue
Block a user