Implement user authentication and account pages
Adds AuthContext with Orval API integration, user login/logout/register flows, and account settings page. Refactors navigation and layouts to use authentication context. Introduces new account-related pages (Login, Register, Logout, AccountSettings), updates PrivateRoute to use AuthContext, and improves error handling in Downloader. Removes obsolete context example and adds comprehensive usage documentation for AuthContext.
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
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 SiteNav from "../components/navbar/SiteNav";
|
||||
|
||||
import styles from "./HomeLayout.module.css";
|
||||
|
||||
export default function ChatLayout(){
|
||||
return(
|
||||
<div className={styles.root}>
|
||||
<SiteNav user={userexists} onLogin={() => {}} onLogout={() => {}} />
|
||||
<SiteNav />
|
||||
<Outlet />
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user