diff --git a/app/list/[id]/page.tsx b/app/list/[id]/page.tsx index b0143e3..73020cd 100644 --- a/app/list/[id]/page.tsx +++ b/app/list/[id]/page.tsx @@ -7,7 +7,6 @@ import Link from 'next/link' import { ArrowLeft } from 'lucide-react' import InlineItemCreate from '@/components/InlineItemCreate' import ListDetailView from '@/components/ListDetailView' -import ListHeader from '@/components/ListHeader' export const dynamic = 'force-dynamic' export const revalidate = 0 @@ -37,22 +36,27 @@ export default async function ListDetailPage({ params }: { params: { id: string return (
{/* Header */} - ({ - ...c, - permission: c.permission as 'editor' | 'viewer' - }))} - /> +
+ + + Back to Lists + + +
+
+

{list.title}

+
+ +

+ {completedItems.length} of {list.items.length} tasks completed +

+
{/* Inline Item Creation - only show if user can edit */} {canEdit && ( diff --git a/components/ListDetailView.tsx b/components/ListDetailView.tsx index 42233be..c373268 100644 --- a/components/ListDetailView.tsx +++ b/components/ListDetailView.tsx @@ -156,6 +156,22 @@ export default function ListDetailView({ return (
+ {/* Permission Badge and Share Button */} + {(permission || canShare) && ( +
+ {permission && } + {canShare && ( + + )} +
+ )} + {/* Search Bar */} -} - -export default function ListHeader({ - listId, - listTitle, - listColor, - completedCount, - totalCount, - permission, - canShare, - ownerId, - ownerName, - ownerEmail, - collaborators -}: ListHeaderProps) { - const [mounted, setMounted] = useState(false) - const [isShareModalOpen, setIsShareModalOpen] = useState(false) - - useEffect(() => { - setMounted(true) - }, []) - - return ( - <> -
- - - Back to Lists - - -
-
-
-

{listTitle}

-
- - {mounted && ( -
- - {canShare && ( - - )} -
- )} -
- -

- {completedCount} of {totalCount} tasks completed -

-
- - {mounted && ( - setIsShareModalOpen(false)} - listId={listId} - listTitle={listTitle} - isOwner={permission === 'owner'} - ownerId={ownerId} - ownerName={ownerName} - ownerEmail={ownerEmail} - initialCollaborators={collaborators} - /> - )} - - ) -}