fix(brainstorm): notebookId URL param + lookup carnet + bouton 'Open notebook'
- brainstorm-page.tsx: lit urlNotebookId depuis URL params - useConvertIdea accepte targetNotebookId (hook mis à jour) - handleConvert prend le carnet ciblé en paramètre - URL notebookId propage via router.push depuis le modal de confirmation - toast inclut le nom du carnet et un bouton 'Open notebook' qui redirige vers /home?notebook=X - peek panel affiche un lien vers le carnet source en haut du titre - useNotebooks pour le lookup du nom depuis notebooks Vrai fix: les notes vont maintenant là où l'utilisateur a choisi, pas dans un carnet auto-créé sans qu'il s'en aperçoive.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { type ReactNode } from 'react'
|
||||
import { motion, AnimatePresence, useReducedMotion } from 'motion/react'
|
||||
import { X, Maximize2, Loader2 } from 'lucide-react'
|
||||
import { X, Maximize2, Loader2, FolderOpen } from 'lucide-react'
|
||||
import { useLanguage } from '@/lib/i18n'
|
||||
import type { Note } from '@/lib/types'
|
||||
import { NotePeekContent } from './note-peek-content'
|
||||
@@ -77,6 +77,15 @@ export function NotePeekPanel({
|
||||
renderContent(note, blockId)
|
||||
) : (
|
||||
<>
|
||||
{note.notebookId && (
|
||||
<a
|
||||
href={`/home?notebook=${note.notebookId}`}
|
||||
className="inline-flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-widest text-brand-accent hover:text-brand-accent/70 transition-colors mb-2 cursor-pointer"
|
||||
>
|
||||
<FolderOpen size={11} />
|
||||
{t('brainstorm.openNotebook') || 'Open notebook'}
|
||||
</a>
|
||||
)}
|
||||
<h2 className="text-xl font-serif font-medium text-ink dark:text-dark-ink mb-6">
|
||||
{note.title || t('notePeek.untitled') || 'Untitled'}
|
||||
</h2>
|
||||
|
||||
Reference in New Issue
Block a user