Some checks failed
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Has been skipped
Podman Rootless Demo / build-backend (push) Failing after 1s
Podman Rootless Demo / deploy-prod (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Has been skipped
87 lines
3 KiB
TypeScript
87 lines
3 KiB
TypeScript
/**
|
|
* This file is part of Sharenet.
|
|
*
|
|
* Sharenet is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
|
*
|
|
* You may obtain a copy of the license at:
|
|
* https://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
*
|
|
* Copyright (c) 2024 Continuist <continuist02@gmail.com>
|
|
*/
|
|
|
|
import type { Metadata, Viewport } from "next";
|
|
import { Inter } from "next/font/google";
|
|
import "./globals.css";
|
|
import Link from "next/link";
|
|
import { MobileNav } from "@/components/mobile-nav";
|
|
import { AuthProvider } from "@/lib/auth/context";
|
|
import { AuthNav } from "@/components/auth/auth-nav";
|
|
|
|
const inter = Inter({ subsets: ["latin"] });
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Sharenet Admin",
|
|
description: "Admin interface for Sharenet",
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: 'device-width',
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
userScalable: false,
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="en">
|
|
<body className={inter.className}>
|
|
<AuthProvider>
|
|
<div className="min-h-screen bg-gray-100">
|
|
<nav className="bg-white shadow-sm">
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div className="flex justify-between h-16">
|
|
<div className="flex">
|
|
<div className="flex-shrink-0 flex items-center">
|
|
<h1 className="text-xl font-bold">Sharenet Admin</h1>
|
|
</div>
|
|
<div className="hidden sm:ml-6 sm:flex sm:space-x-8">
|
|
<Link
|
|
href="/"
|
|
className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"
|
|
>
|
|
Dashboard
|
|
</Link>
|
|
<Link
|
|
href="/users"
|
|
className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"
|
|
>
|
|
Users
|
|
</Link>
|
|
<Link
|
|
href="/products"
|
|
className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"
|
|
>
|
|
Products
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
<div className="flex items-center space-x-4">
|
|
<AuthNav />
|
|
<MobileNav />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main className="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
|
{children}
|
|
</main>
|
|
</div>
|
|
</AuthProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|