diff --git a/src/app/dashboard/cms/content/page.tsx b/src/app/dashboard/cms/content/page.tsx index 979e149..3310f7c 100644 --- a/src/app/dashboard/cms/content/page.tsx +++ b/src/app/dashboard/cms/content/page.tsx @@ -10,9 +10,23 @@ export default async function ContentPage() { .select('*') .order('key') - // CMS migration script creates default keys. - // If table is empty, we might want to seed it or just show empty. - // Assuming migration ran, we have data. + // Define default contents that should exist + const DEFAULT_CONTENTS: SiteContent[] = [ + { key: 'social_instagram', value: '', type: 'text', section: 'contact' }, + { key: 'social_facebook', value: '', type: 'text', section: 'contact' }, + { key: 'social_twitter', value: '', type: 'text', section: 'contact' }, + { key: 'contact_map_embed', value: '', type: 'html', section: 'contact' }, + ] + + // Merge default contents with existing contents + const mergedContents = [...(contents as SiteContent[] || [])] + const existingKeys = new Set(mergedContents.map(c => c.key)) + + DEFAULT_CONTENTS.forEach(item => { + if (!existingKeys.has(item.key)) { + mergedContents.push(item) + } + }) return (
@@ -22,7 +36,7 @@ export default async function ContentPage() { Site başlığı, sloganlar, iletişim bilgileri ve logoları buradan yönetebilirsiniz.

- + ) } diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx index ae371cd..6f91e10 100644 --- a/src/app/dashboard/layout.tsx +++ b/src/app/dashboard/layout.tsx @@ -3,6 +3,7 @@ import { UserNav } from "@/components/user-nav" import { Building } from "lucide-react" import { MobileSidebar } from "@/components/mobile-sidebar" import { createClient } from "@/lib/supabase/server" +import { NavigationButtons } from "@/components/navigation-buttons" export default async function DashboardLayout({ children, @@ -28,12 +29,15 @@ export default async function DashboardLayout({
{/* Header */}
-
- -
- - WeddingOS +
+
+ +
+ + WeddingOS +
+
diff --git a/src/components/navigation-buttons.tsx b/src/components/navigation-buttons.tsx new file mode 100644 index 0000000..dee0e87 --- /dev/null +++ b/src/components/navigation-buttons.tsx @@ -0,0 +1,32 @@ +"use client" + +import { Button } from "@/components/ui/button" +import { ChevronLeft, ChevronRight } from "lucide-react" +import { useRouter } from "next/navigation" + +export function NavigationButtons() { + const router = useRouter() + + return ( +
+ + +
+ ) +} diff --git a/src/components/public/gallery-grid.tsx b/src/components/public/gallery-grid.tsx index 92be9a4..8833da0 100644 --- a/src/components/public/gallery-grid.tsx +++ b/src/components/public/gallery-grid.tsx @@ -51,7 +51,7 @@ export function GalleryGrid({ items }: GalleryGridProps) { } }} > - {displayImage && ( + {displayImage ? ( {item.caption + ) : ( +
+ {/* Fallback for video without generic thumbnail */} +
)}
{item.video_url && (