From a9a5dd4e6f8812682d9027aaf8184226c023d821 Mon Sep 17 00:00:00 2001 From: DanielS Date: Wed, 24 Jun 2026 23:37:40 +0200 Subject: [PATCH] Cleanup admin settings page, remove duplicate imports and partner code --- shop/app/admin/einstellungen/page.tsx | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/shop/app/admin/einstellungen/page.tsx b/shop/app/admin/einstellungen/page.tsx index 5edc207..f6e607e 100644 --- a/shop/app/admin/einstellungen/page.tsx +++ b/shop/app/admin/einstellungen/page.tsx @@ -1,6 +1,50 @@ /* Updated Admin Settings without Partner Management */ +/* Admin Settings without Partner Management */ 'use client'; +import { useState, useEffect } from 'react'; +import { Switch } from '@/components/ui/switch'; + +export default function AdminSettings() { + const [demoActive, setDemoActive] = useState(true); + + useEffect(() => { + const state = localStorage.getItem('demo_banner_disabled') !== 'true'; + setDemoActive(state); + }, []); + + const toggleDemo = (checked: boolean) => { + setDemoActive(checked); + localStorage.setItem('demo_banner_disabled', (!checked).toString()); + window.dispatchEvent(new Event('storage_demo_changed')); + }; + + return ( +
+ {/* Page Header */} +
+

Admin Einstellungen

+

+ Verwalten Sie globale Shopeinstellungen. +

+
+ + {/* Allgemeine Einstellungen */} +
+

Allgemeine Einstellungen

+
+
+

Demo-Warnmeldungen

+

Schaltet gelbe Banner ein oder aus.

+
+ +
+
+
+ ); +} + + import { useState, useEffect } from 'react'; import { Switch } from '@/components/ui/switch'; import { Button } from '@/components/ui/button';