File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
web_ui/src/pages/annotator/providers/annotator-provider Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const AnnotatorProvider = ({ children }: AnnotatorProviderProps): JSX.Ele
69
69
70
70
const [ activeTool , setActiveTool ] = useState < ToolType > ( ( ) => defaultToolForProject ( activeDomains ) ) ;
71
71
72
- const { selectedMediaItem, predictionsQuery, explanationsQuery } = useSelectedMediaItem ( ) ;
72
+ const { selectedMediaItem, predictionsQuery } = useSelectedMediaItem ( ) ;
73
73
const isTaskChainSelectedClassification = isTaskChainDomainSelected ( DOMAIN . CLASSIFICATION ) ;
74
74
75
75
const initialPredictionAnnotations = predictionsQuery . data ?. annotations ;
@@ -79,7 +79,6 @@ export const AnnotatorProvider = ({ children }: AnnotatorProviderProps): JSX.Ele
79
79
userProjectSettings ,
80
80
isTaskChainSelectedClassification
81
81
) ;
82
- const explanations = explanationsQuery . data || [ ] ;
83
82
84
83
const { undoRedoActions, ...userAnnotationScene } = useAnnotationSceneState (
85
84
initialAnnotations ,
@@ -110,7 +109,7 @@ export const AnnotatorProvider = ({ children }: AnnotatorProviderProps): JSX.Ele
110
109
settings = { userProjectSettings }
111
110
userAnnotationScene = { userAnnotationScene }
112
111
initPredictions = { initialPredictionAnnotations }
113
- explanations = { explanations || EMPTY_EXPLANATION }
112
+ explanations = { selectedMediaItem ?. explanations || EMPTY_EXPLANATION }
114
113
>
115
114
< SubmitAnnotationsProvider
116
115
settings = { userProjectSettings }
You can’t perform that action at this time.
0 commit comments