11import LoadingIcon from "@/src/components/shared/loading/LoadingIcon"
22import { selectUser } from "@/src/reduxStore/states/general"
33import { removeFromRlaById , selectDisplayUserRole , selectHoverGroupDict , selectRecordRequests , selectRecordRequestsRecord , selectSettings , selectTmpHighlightIds , selectUserDisplayId , setHoverGroupDict , tmpAddHighlightIds } from "@/src/reduxStore/states/pages/labeling"
4- import { selectAttributes , selectLabelingTasksAll , selectVisibleAttributesLabeling } from "@/src/reduxStore/states/pages/settings"
4+ import { selectLabelingTasksAll , selectVisibleAttributesLabeling } from "@/src/reduxStore/states/pages/settings"
55import { selectProjectId } from "@/src/reduxStore/states/project"
66import { HotkeyLookup , LabelSourceHover , LabelingVars , TokenLookup } from "@/src/types/components/projects/projectId/labeling/labeling"
77import { LabelingTaskTaskType } from "@/src/types/components/projects/projectId/settings/labeling-tasks"
88import { UserRole } from "@/src/types/shared/sidebar"
99import { DEFAULT_LABEL_COLOR , FULL_RECORD_ID , SWIM_LANE_SIZE_PX , buildLabelingRlaData , checkCanEditLabels , collectSelectionData , filterRlaDataForLabeling , findOrderPosItem , getDefaultLabelingVars , getFirstFitPos , getGoldInfoForTask , getOrderLookupItem , getOrderLookupSort , getTaskTypeOrder , getTokenData , parseSelectionData } from "@/src/util/components/projects/projectId/labeling/labeling-helper"
1010import { TOOLTIPS_DICT } from "@/src/util/tooltip-constants"
1111import { Tooltip } from "@nextui-org/react"
12- import { IconAlertCircle , IconAssembly , IconBolt , IconCode , IconSparkles , IconStar , IconStarFilled , IconUsers } from "@tabler/icons-react"
12+ import { IconAlertCircle , IconAssembly , IconBolt , IconCode , IconSparkles , IconStar , IconUsers } from "@tabler/icons-react"
1313import { Fragment , useRef , useEffect , useState } from "react"
1414import { useDispatch , useSelector } from "react-redux"
1515import ExtractionDisplay from "./ExtractionDisplay"
@@ -20,7 +20,7 @@ import { LabelingSuiteManager } from "@/src/util/classes/labeling/manager";
2020import { useMutation } from "@apollo/client"
2121import { ADD_CLASSIFICATION_LABELS_TO_RECORD , ADD_EXTRACTION_LABEL_TO_RECORD , CREATE_LABEL , DELETE_RECORD_LABEL_ASSOCIATION_BY_ID , REMOVE_GOLD_STAR_ANNOTATION_FOR_TASK , SET_GOLD_STAR_ANNOTATION_FOR_TASK } from "@/src/services/gql/mutations/labeling"
2222import { SessionManager } from "@/src/util/classes/labeling/session-manager"
23- import { ALL_USERS_USER_ID , GOLD_STAR_USER_ID } from "@/src/util/components/projects/projectId/labeling/labeling-main-component-helper"
23+ import { GOLD_STAR_USER_ID } from "@/src/util/components/projects/projectId/labeling/labeling-main-component-helper"
2424import { useRouter } from "next/router"
2525import LabelSelectionBox from "./LabelSelectionBox"
2626import { filterRlaDataForUser } from "@/src/util/components/projects/projectId/labeling/overview-table-helper"
@@ -71,11 +71,11 @@ export default function LabelingSuiteLabeling() {
7171 const [ removeGoldStarMut ] = useMutation ( REMOVE_GOLD_STAR_ANNOTATION_FOR_TASK ) ;
7272
7373 useEffect ( ( ) => {
74- if ( ! projectId || ! attributes || ! recordRequests || ! user || ! settings || ! userDisplayRole ) return ;
74+ if ( ! projectId || ! attributes || ! recordRequests || ! user || ! settings || ! userDisplayRole || ! labelingTasks ) return ;
7575 attributesChanged ( ) ;
7676 prepareRlaData ( ) ;
7777 rebuildGoldInfo ( ) ;
78- } , [ projectId , attributes , recordRequests , user , settings , userDisplayRole ] ) ;
78+ } , [ projectId , attributes , recordRequests , user , settings , userDisplayRole , labelingTasks ] ) ;
7979
8080 useEffect ( ( ) => {
8181 if ( ! labelingTasks || ! lVars ) return ;
@@ -136,10 +136,10 @@ export default function LabelingSuiteLabeling() {
136136 } , [ tokenLookup ] ) ;
137137
138138 useEffect ( ( ) => {
139- if ( ! settings ) return ;
139+ if ( ! settings || ! lVars || ! labelingTasks ) return ;
140140 rebuildTaskLookup ( lVars ) ;
141141 filterRlaDataForCurrent ( ) ;
142- } , [ settings ] ) ;
142+ } , [ settings , lVars , labelingTasks ] ) ;
143143
144144 useEffect ( ( ) => {
145145 if ( ! user || ! displayUserId || ! userDisplayRole ) return ;
0 commit comments