Files
Checkmate/Client/src/Layouts/HomeLayout/index.jsx
T

30 lines
788 B
React
Raw Normal View History

2024-06-06 13:10:13 -07:00
import NavBar from "../../Components/NavBar";
import { Outlet } from "react-router";
import DashboardSidebar from "../../Components/DashboardSidebar";
import "./index.css";
// Demo, remove me
2024-06-07 16:17:10 -07:00
import { useSelector } from "react-redux";
2024-06-06 13:10:13 -07:00
// Emd Demo
2024-05-06 12:29:36 -04:00
const HomeLayout = () => {
2024-06-07 16:17:10 -07:00
const authState = useSelector((state) => state.auth);
const { user, msg } = authState;
return (
<div className="home-layout">
<DashboardSidebar />
<div className="main-content">
<NavBar />
2024-06-06 13:10:13 -07:00
{/* Remove me later */}
2024-06-07 16:17:10 -07:00
{user && <p>{user.firstname}</p>}
{user && <p>{user.lastname}</p>}
{user && <p>{user.email}</p>}
{msg && <p>Msg: {msg}</p>}
2024-06-06 13:10:13 -07:00
{/* I am a demo */}
</div>
2024-06-06 22:04:30 +03:30
<Outlet />
</div>
);
2024-06-06 13:10:13 -07:00
};
2024-05-06 12:29:36 -04:00
export default HomeLayout;