new interactive

This commit is contained in:
Biqoz
2025-09-15 19:05:59 +02:00
parent 130929b756
commit 050474e95b
16 changed files with 746 additions and 330 deletions

View File

@@ -21,7 +21,7 @@ export const useColorMapping = (entityMappings: EntityMapping[]) => {
const getCurrentColor = useCallback(
(selectedText: string): string => {
if (!selectedText || !entityMappings) {
return COLOR_PALETTE[0].value;
return '#e5e7eb'; // Couleur grise par défaut au lieu du bleu
}
// Chercher le mapping correspondant au texte sélectionné
@@ -39,8 +39,8 @@ export const useColorMapping = (entityMappings: EntityMapping[]) => {
return generateColorFromName(mapping.entity_type).value;
}
// Générer une couleur basée sur le texte
return generateColorFromName(selectedText).value;
// Retourner gris par défaut si aucun mapping
return '#e5e7eb';
},
[entityMappings]
);