From 58bf030aaa674b62ac9cf3eb5c170ddab34e7a90 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Mon, 13 Jun 2022 15:00:51 +0200 Subject: [PATCH] Remove unused `usePrism()` --- .../DopeSheet/Left/SheetObjectRow.tsx | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx index bfb755c..f1518bd 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Left/SheetObjectRow.tsx @@ -1,5 +1,4 @@ import type {SequenceEditorTree_SheetObject} from '@theatre/studio/panels/SequenceEditorPanel/layout/tree' -import {usePrism} from '@theatre/react' import React from 'react' import AnyCompositeRow from './AnyCompositeRow' import {decideRowByPropType} from './PropWithChildrenRow' @@ -9,28 +8,26 @@ import getStudio from '@theatre/studio/getStudio' const LeftSheetObjectRow: React.VFC<{ leaf: SequenceEditorTree_SheetObject }> = ({leaf}) => { - return usePrism(() => { - return ( - { - // set selection to this sheet object on click - getStudio().transaction(({stateEditors}) => { - stateEditors.studio.historic.panels.outline.selection.set([ - leaf.sheetObject, - ]) - }) - }} - toggleCollapsed={() => - setCollapsedSheetObjectOrCompoundProp(!leaf.isCollapsed, leaf) - } - > - {leaf.children.map((leaf) => decideRowByPropType(leaf))} - - ) - }, [leaf]) + return ( + { + // set selection to this sheet object on click + getStudio().transaction(({stateEditors}) => { + stateEditors.studio.historic.panels.outline.selection.set([ + leaf.sheetObject, + ]) + }) + }} + toggleCollapsed={() => + setCollapsedSheetObjectOrCompoundProp(!leaf.isCollapsed, leaf) + } + > + {leaf.children.map((leaf) => decideRowByPropType(leaf))} + + ) } export default LeftSheetObjectRow