File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,7 +403,9 @@ function PlotEditor({
403403 ? "Voisinage déconseillé"
404404 : inRotation
405405 ? "Rotation : même famille ici récemment"
406- : plant ?. nom ?? "Case vide" ;
406+ : plant
407+ ? `${ plant . nom } — espacement ${ plant . espacement } `
408+ : "Case vide" ;
407409 return (
408410 < button
409411 key = { index }
@@ -435,6 +437,38 @@ function PlotEditor({
435437 </ div >
436438 </ div >
437439
440+ { ( ( ) => {
441+ const ids = Array . from (
442+ new Set ( plot . cells . filter ( ( c ) : c is string => Boolean ( c ) ) )
443+ ) ;
444+ if ( ids . length === 0 ) return null ;
445+ return (
446+ < div className = "mt-4 border-t border-emerald-50 dark:border-zinc-800 pt-3" >
447+ < p className = "mb-2 text-xs font-semibold uppercase tracking-wide text-emerald-600 dark:text-emerald-400" >
448+ 📏 Distances de plantation
449+ </ p >
450+ < div className = "flex flex-wrap gap-2" >
451+ { ids . map ( ( id ) => {
452+ const plant = getPlantById ( id ) ;
453+ if ( ! plant ) return null ;
454+ return (
455+ < span
456+ key = { id }
457+ className = "flex items-center gap-1.5 rounded-full bg-emerald-50 px-2.5 py-1 text-xs text-emerald-800 dark:bg-zinc-800 dark:text-emerald-100"
458+ >
459+ < span > { plant . emoji } </ span >
460+ < span className = "font-medium" > { plant . nom } </ span >
461+ < span className = "text-emerald-700/70 dark:text-emerald-300/70" >
462+ { plant . espacement }
463+ </ span >
464+ </ span >
465+ ) ;
466+ } ) }
467+ </ div >
468+ </ div >
469+ ) ;
470+ } ) ( ) }
471+
438472 < div className = "mt-3 flex flex-wrap items-center gap-4 text-xs text-emerald-700/80 dark:text-emerald-300/80" >
439473 < span >
440474 Pinceau actuel :{ " " }
You can’t perform that action at this time.
0 commit comments