diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx index dca4543..7e3bf32 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx @@ -4,7 +4,7 @@ import { NotebookResponse } from '@/lib/types/api' import { NotebookCard } from './NotebookCard' import { LoadingSpinner } from '@/components/common/LoadingSpinner' import { EmptyState } from '@/components/common/EmptyState' -import { Book, ChevronDown, ChevronRight } from 'lucide-react' +import { Book, ChevronDown, ChevronRight, Plus } from 'lucide-react' import { Button } from '@/components/ui/button' import { useState } from 'react' @@ -15,6 +15,8 @@ interface NotebookListProps { collapsible?: boolean emptyTitle?: string emptyDescription?: string + onAction?: () => void + actionLabel?: string } export function NotebookList({ @@ -24,6 +26,8 @@ export function NotebookList({ collapsible = false, emptyTitle, emptyDescription, + onAction, + actionLabel, }: NotebookListProps) { const [isExpanded, setIsExpanded] = useState(!collapsible) @@ -41,6 +45,12 @@ export function NotebookList({ icon={Book} title={emptyTitle ?? `No ${title.toLowerCase()}`} description={emptyDescription ?? 'Start by creating your first notebook to organize your research.'} + action={onAction && actionLabel ? ( + + ) : undefined} /> ) } diff --git a/frontend/src/app/(dashboard)/notebooks/page.tsx b/frontend/src/app/(dashboard)/notebooks/page.tsx index 94d1f3d..843eef2 100644 --- a/frontend/src/app/(dashboard)/notebooks/page.tsx +++ b/frontend/src/app/(dashboard)/notebooks/page.tsx @@ -77,6 +77,8 @@ export default function NotebooksPage() { title="Active Notebooks" emptyTitle={isSearching ? 'No notebooks match your search' : undefined} emptyDescription={isSearching ? 'Try using a different notebook name.' : undefined} + onAction={!isSearching ? () => setCreateDialogOpen(true) : undefined} + actionLabel={!isSearching ? "Create Notebook" : undefined} /> {hasArchived && (