From e048fc5d177fde21da05e013d9ba16ed98b3cd3b Mon Sep 17 00:00:00 2001 From: Janis Date: Thu, 19 Jan 2023 11:03:17 +0100 Subject: [PATCH] add admin link above header --- app/layout.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/layout.tsx b/app/layout.tsx index e52220d..894be69 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,6 +6,7 @@ import Footer from "./Footer"; import { Category } from "@prisma/client"; import urlJoin from "url-join"; import { apiUrl } from "./global"; +import Link from "next/link"; async function getCategories(): Promise { const result: Response = await fetch(urlJoin(apiUrl, `categories`), { @@ -22,7 +23,9 @@ export default async function RootLayout({ children }: { children: React.ReactNo -

If admin logged in create a small header here app/layout.tsx

+
+ Admin +