From eb7da996a7c2d617d276f296cac07a6fd5648664 Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 27 Oct 2024 12:03:14 +0000
Subject: ui: Redesign the settings page and move it to its own layout

---
 apps/web/app/settings/layout.tsx | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 apps/web/app/settings/layout.tsx

(limited to 'apps/web/app/settings/layout.tsx')

diff --git a/apps/web/app/settings/layout.tsx b/apps/web/app/settings/layout.tsx
new file mode 100644
index 00000000..0ab6c624
--- /dev/null
+++ b/apps/web/app/settings/layout.tsx
@@ -0,0 +1,34 @@
+import Header from "@/components/dashboard/header/Header";
+import DemoModeBanner from "@/components/DemoModeBanner";
+import MobileSidebar from "@/components/settings/sidebar/ModileSidebar";
+import Sidebar from "@/components/settings/sidebar/Sidebar";
+import { Separator } from "@/components/ui/separator";
+import ValidAccountCheck from "@/components/utils/ValidAccountCheck";
+
+import serverConfig from "@hoarder/shared/config";
+
+export default async function SettingsLayout({
+  children,
+}: Readonly<{
+  children: React.ReactNode;
+}>) {
+  return (
+    <div>
+      <Header />
+      <div className="flex min-h-[calc(100vh-64px)] w-screen flex-col sm:h-[calc(100vh-64px)] sm:flex-row">
+        <ValidAccountCheck />
+        <div className="hidden flex-none sm:flex">
+          <Sidebar />
+        </div>
+        <main className="flex-1 bg-muted sm:overflow-y-auto">
+          {serverConfig.demoMode && <DemoModeBanner />}
+          <div className="block w-full sm:hidden">
+            <MobileSidebar />
+            <Separator />
+          </div>
+          <div className="min-h-30 container p-4">{children}</div>
+        </main>
+      </div>
+    </div>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

