Implemented registering
This commit is contained in:
1 parent
e442f8be64
commit
31a18d042d
6 files changed
+66
-11
No files matched your search
@@ -1,17 +1,29 @@
|
||||
import NavBar from '../../Components/NavBar';
|
||||
import { Outlet } from 'react-router';
|
||||
import DashboardSidebar from '../../Components/DashboardSidebar';
|
||||
import './index.css';
|
||||
import NavBar from "../../Components/NavBar";
|
||||
import { Outlet } from "react-router";
|
||||
import DashboardSidebar from "../../Components/DashboardSidebar";
|
||||
import "./index.css";
|
||||
|
||||
// Demo, remove me
|
||||
import { jwtDecode } from "jwt-decode";
|
||||
// Emd Demo
|
||||
|
||||
const HomeLayout = () => {
|
||||
const token = localStorage.getItem("token");
|
||||
const decodedToken = token && jwtDecode(token);
|
||||
return (
|
||||
<div className="home-layout">
|
||||
<DashboardSidebar />
|
||||
<div className="main-content">
|
||||
<NavBar />
|
||||
{/* Remove me later */}
|
||||
{token && <p>You are logged in</p>}
|
||||
{token && <p>First Name: {decodedToken.firstname}</p>}
|
||||
{token && <p>Last Name: {decodedToken.lastname}</p>}
|
||||
{token && <p>Email: {decodedToken.email}</p>}
|
||||
{/* I am a demo */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default HomeLayout;
|
||||
Reference in new issue
Block a user