diff --git a/app/list/[id]/page.tsx b/app/list/[id]/page.tsx index 73020cd..e321a4d 100644 --- a/app/list/[id]/page.tsx +++ b/app/list/[id]/page.tsx @@ -6,7 +6,7 @@ import { notFound } from 'next/navigation' import Link from 'next/link' import { ArrowLeft } from 'lucide-react' import InlineItemCreate from '@/components/InlineItemCreate' -import ListDetailView from '@/components/ListDetailView' +import ListDetailView from '@/components/ClientOnlyListDetailView' export const dynamic = 'force-dynamic' export const revalidate = 0 diff --git a/components/ClientOnlyListDetailView.tsx b/components/ClientOnlyListDetailView.tsx new file mode 100644 index 0000000..b6a56c7 --- /dev/null +++ b/components/ClientOnlyListDetailView.tsx @@ -0,0 +1,40 @@ +'use client' + +import { useEffect, useState } from 'react' +import ListDetailView from './ListDetailView' + +interface ClientOnlyListDetailViewProps { + listId: string + initialItems: any[] + permission?: 'owner' | 'editor' | 'viewer' + canShare?: boolean + listTitle?: string + ownerId?: string + ownerName?: string | null + ownerEmail?: string + collaborators?: any[] +} + +export default function ClientOnlyListDetailView(props: ClientOnlyListDetailViewProps) { + const [mounted, setMounted] = useState(false) + + useEffect(() => { + setMounted(true) + }, []) + + if (!mounted) { + return ( +