fix: change is_active type from number to boolean to match API response

This commit is contained in:
Marko Djordjevic 2026-02-17 19:59:48 +01:00
parent a75c9307d4
commit 4352732630
8 changed files with 14 additions and 14 deletions

View file

@ -33,7 +33,7 @@ interface SpanLabelType {
display_name: string;
color: string;
hotkey: string | null;
is_active: number;
is_active: boolean;
sort_order: number;
created_at: number;
}
@ -461,7 +461,7 @@ export default function SpanAnnotationManager({
// Hotkey label assignment: only when span tool is active and a span range is selected (after first click)
if (activeTool === 'span' && interactionState === 'first-click-done' && startCandle) {
// Check if key matches any label hotkey
const matchingLabel = spanLabelTypes.find((lt) => lt.hotkey === e.key && lt.is_active === 1);
const matchingLabel = spanLabelTypes.find((lt) => lt.hotkey === e.key && lt.is_active);
if (matchingLabel && activeChartId) {
e.preventDefault();