diff --git a/src/components/admin/StoreSettingsEditor.jsx b/src/components/admin/StoreSettingsEditor.jsx
index f4b70b7..1829c01 100644
--- a/src/components/admin/StoreSettingsEditor.jsx
+++ b/src/components/admin/StoreSettingsEditor.jsx
@@ -1,5 +1,4 @@
import { useState, useEffect, useMemo } from 'react'
-import { Card, CardContent, CardHeader, CardTitle } from '../ui/card'
import { Input } from '../ui/input'
import { Button } from '../ui/button'
import { Select } from '../ui/select'
@@ -21,8 +20,9 @@ import {
import { Navbar } from '../../components/storefront/Navbar'
import { Hero } from '../../components/storefront/Hero'
import { ProductCard } from '../../components/storefront/ProductCard'
+import { Carousel } from '../../components/storefront/Carousel'
import { Footer } from '../../components/storefront/Footer'
-import { Paintbrush, Type, Layout, Image as ImageIcon, Info, MapPin, Mail } from 'lucide-react'
+import { Paintbrush, Type, Layout, Image as ImageIcon, Info, MapPin, PanelLeftClose, PanelLeftOpen } from 'lucide-react'
const MOCK_PRODUCTS = [
{
@@ -57,6 +57,12 @@ const MOCK_PRODUCTS = [
}
]
+const MOCK_COLLECTIONS = [
+ { id: 'featured', name: 'Featured' },
+ { id: 'workspace', name: 'Workspace' },
+ { id: 'audio', name: 'Audio' },
+]
+
const COLOR_GROUPS = [
{
title: 'Brand Colors',
@@ -129,6 +135,8 @@ function sanitizeHexInput(value) {
export function StoreSettingsEditor() {
const [activeSection, setActiveSection] = useState('theme')
+ const [previewPage, setPreviewPage] = useState('home')
+ const [editorCollapsed, setEditorCollapsed] = useState(false)
const [settings, setSettings] = useState({
logoType: 'text',
logoText: 'OpenShop',
@@ -151,7 +159,6 @@ export function StoreSettingsEditor() {
businessPostalCode: '',
businessCountry: ''
})
- const [loading, setLoading] = useState(false)
const [saving, setSaving] = useState(false)
const [modalImage, setModalImage] = useState(null)
const [savedOpen, setSavedOpen] = useState(false)
@@ -209,7 +216,6 @@ export function StoreSettingsEditor() {
const fetchSettings = async () => {
try {
- setLoading(true)
const response = await fetch('/api/store-settings')
if (response.ok) {
const data = await response.json()
@@ -225,8 +231,6 @@ export function StoreSettingsEditor() {
}
} catch (error) {
console.error('Error fetching store settings:', error)
- } finally {
- setLoading(false)
}
}
@@ -425,53 +429,71 @@ export function StoreSettingsEditor() {
]
return (
-
- {/* Sidebar Controls */}
-
-
-
Store Editor
-
Real-time preview
+
+
+
+
+
Store settings
+
Edit content on the left and compare with a storefront-accurate preview.
+
+
+
+
+
+
+
+
+
- {/* Navigation Tabs */}
-
- {menuItems.map(item => {
- const Icon = item.icon
- return (
-
- )
- })}
-
+
+ {!editorCollapsed && (
+
+
+ {menuItems.map((item) => {
+ const Icon = item.icon
+ return (
+
+ )
+ })}
+
- {/* Form Area */}
-
- {activeSection === 'theme' && (
-
-
-
Theme
-