'use client' import dynamic from 'next/dynamic' import { Note } from '@/lib/types' import { NotesTabsView } from '@/components/notes-tabs-view' import { NotesListView } from '@/components/notes-list-view' const MasonryGridLazy = dynamic( () => import('@/components/masonry-grid').then((m) => m.MasonryGrid), { ssr: false, loading: () => (
), } ) export type NotesViewMode = 'masonry' | 'tabs' | 'list' interface NotesMainSectionProps { notes: Note[] viewMode: NotesViewMode onEdit?: (note: Note, readOnly?: boolean) => void onSizeChange?: (noteId: string, size: 'small' | 'medium' | 'large') => void currentNotebookId?: string | null noteHistoryMode?: 'manual' | 'auto' onOpenHistory?: (note: Note) => void onEnableHistory?: (noteId: string) => Promise onNoteCreated?: (note: Note) => void } export function NotesMainSection({ notes, viewMode, onEdit, onSizeChange, currentNotebookId, noteHistoryMode = 'manual', onOpenHistory, onEnableHistory, onNoteCreated, }: NotesMainSectionProps) { if (viewMode === 'list') { return (
) } if (viewMode === 'tabs') { return (
) } return (
) }