From d9d67250c85a5989e580c9944a6da50111632ed4 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Tue, 19 Mar 2024 16:08:21 +0000
Subject: fix(web): Only show demo mode banner in demo mode

---
 apps/web/app/dashboard/layout.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

diff --git a/apps/web/app/dashboard/layout.tsx b/apps/web/app/dashboard/layout.tsx
index b79fd0f9..50c7cc60 100644
--- a/apps/web/app/dashboard/layout.tsx
+++ b/apps/web/app/dashboard/layout.tsx
@@ -4,6 +4,8 @@ import UploadDropzone from "@/components/dashboard/UploadDropzone";
 import DemoModeBanner from "@/components/DemoModeBanner";
 import { Separator } from "@/components/ui/separator";
 
+import serverConfig from "@hoarder/shared/config";
+
 export default async function Dashboard({
   children,
 }: Readonly<{
@@ -15,7 +17,7 @@ export default async function Dashboard({
         <Sidebar />
       </div>
       <main className="flex-1 bg-gray-100 sm:overflow-y-auto">
-        <DemoModeBanner />
+        {serverConfig.demoMode && <DemoModeBanner />}
         <div className="block w-full sm:hidden">
           <MobileSidebar />
           <Separator />
-- 
cgit v1.2.3-70-g09d2

