emily user to edit admin
This commit is contained in:
parent
8a45f49a04
commit
52f17d5a00
@ -5,8 +5,8 @@ import "./globals.css";
|
||||
import { action, createStore, StoreProvider } from "easy-peasy";
|
||||
import { Inter } from "next/font/google";
|
||||
|
||||
import { StoreModel } from '@appTypes/StoreModel';
|
||||
import Navbar from '@components/Navbar';
|
||||
import { StoreModel } from "@appTypes/StoreModel";
|
||||
import Navbar from "@components/Navbar";
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
@ -23,17 +23,17 @@ const store = createStore<StoreModel>({
|
||||
conversionRates: { GBP: 0.85, USD: 1.14, EUR: 1 },
|
||||
tickers: { GBP: "£", USD: "$", EUR: "€" },
|
||||
},
|
||||
user: null,
|
||||
// user: {
|
||||
// id: 123456,
|
||||
// createdAt: new Date(8.64e15),
|
||||
// email: "tim.howitz@dyson.com",
|
||||
// passwordHash: "",
|
||||
// name: "Tim Howitz",
|
||||
// role: "ADMIN",
|
||||
// scientist: undefined,
|
||||
// purchasedArtifacts: [],
|
||||
// },
|
||||
// user: null,
|
||||
user: {
|
||||
id: 123456,
|
||||
createdAt: new Date(8.64e15),
|
||||
email: "emily.neighbour@dyson.com",
|
||||
passwordHash: "",
|
||||
name: "Emily Neighbour",
|
||||
role: "ADMIN",
|
||||
scientist: undefined,
|
||||
purchasedArtifacts: [],
|
||||
},
|
||||
});
|
||||
|
||||
export default function RootLayout({
|
||||
|
||||
@ -108,7 +108,6 @@ export default function Navbar({}: // currencySelector,
|
||||
<NavbarButton name="About Us" href="/about" dropdownItems={aboutDropdown} />
|
||||
</div>
|
||||
<div className="flex-grow" />
|
||||
|
||||
{pathname.includes("shop") && (
|
||||
<button className="flex items-center justify-center mr-3 py-4 relative group">
|
||||
<span className={`px-4 py-1.5 rounded-md transition-colors`}>{selectedCurrency}</span>
|
||||
@ -129,7 +128,6 @@ export default function Navbar({}: // currencySelector,
|
||||
</div>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{user && (user.role === "SCIENTIST" || user.role === "ADMIN") && (
|
||||
<div className="flex h-full mr-5">
|
||||
<ManagementNavbarButton name="Warehouse" href="/warehouse"></ManagementNavbarButton>
|
||||
@ -140,7 +138,6 @@ export default function Navbar({}: // currencySelector,
|
||||
<ManagementNavbarButton name="Admin" href="/administrator"></ManagementNavbarButton>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button className="my-auto mr-4" onClick={() => (user ? router.push("/profile") : setIsModalOpen(true))}>
|
||||
<FaRegUserCircle size={22} />
|
||||
</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user