All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m3s
- Add parentId to Notebook model (tree structure) - Update sidebar to render parent/child notebooks with expand/collapse - Add sub-notebook creation from parent notebook - Remove 'list' from NotesViewMode type everywhere - Delete 22 unused components, hooks, and UI files - Wrap revalidatePath in try-catch to prevent save 500 - Update notebook API to support parentId in creation
31 lines
897 B
TypeScript
31 lines
897 B
TypeScript
import { getAllNotes } from '@/app/actions/notes'
|
|
import { getAISettings } from '@/app/actions/ai-settings'
|
|
import { HomeClient } from '@/components/home-client'
|
|
|
|
export default async function HomePage() {
|
|
const [allNotes, settings] = await Promise.all([
|
|
getAllNotes(),
|
|
getAISettings(),
|
|
])
|
|
|
|
const notesViewMode =
|
|
settings?.notesViewMode === 'masonry'
|
|
? ('masonry' as const)
|
|
: settings?.notesViewMode === 'tabs'
|
|
? ('tabs' as const)
|
|
: ('masonry' as const)
|
|
|
|
return (
|
|
<HomeClient
|
|
initialNotes={allNotes}
|
|
initialSettings={{
|
|
showRecentNotes: settings?.showRecentNotes !== false,
|
|
notesViewMode,
|
|
noteHistory: settings?.noteHistory === true,
|
|
noteHistoryMode: (settings?.noteHistoryMode ?? 'manual') as 'manual' | 'auto',
|
|
aiAssistantEnabled: settings?.paragraphRefactor !== false,
|
|
}}
|
|
/>
|
|
)
|
|
}
|