Skip to content

Commit 300d09c

Browse files
authored
Fix: Use categories from api (#2430)
1 parent d76bc0f commit 300d09c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/client/src/library/components/plan/PlanChangePreview.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ function PlanChangePreviewDirect({
129129
disabled?: boolean
130130
}): JSX.Element {
131131
const dispatch = usePlanDispatch()
132-
const { categories, change_categorization } = usePlan()
132+
const { categories } = usePlan()
133133

134134
const models = useStoreContext(s => s.models)
135135

136136
useEffect(() => {
137137
dispatch(
138138
changes.map(change => ({
139139
type: EnumPlanActions.Category,
140-
category:
141-
change_categorization.get(change.name)?.category ??
142-
categories.find(({ value }) => value === change.change_category),
140+
category: categories.find(
141+
({ value }) => value === change.change_category,
142+
),
143143
change,
144144
})),
145145
)

0 commit comments

Comments
 (0)