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