From fab669f161ffbeac2b21401a5b3db606ef2614e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= Date: Wed, 23 Aug 2023 15:25:59 +0200 Subject: [PATCH] break: remove `onNodeClick` --- .../components/Reveal3DResources/Reveal3DResources.tsx | 9 --------- .../src/components/Reveal3DResources/types.ts | 1 - 2 files changed, 10 deletions(-) diff --git a/react-components/src/components/Reveal3DResources/Reveal3DResources.tsx b/react-components/src/components/Reveal3DResources/Reveal3DResources.tsx index 81a42d5227c..f0296add674 100644 --- a/react-components/src/components/Reveal3DResources/Reveal3DResources.tsx +++ b/react-components/src/components/Reveal3DResources/Reveal3DResources.tsx @@ -20,13 +20,11 @@ import { type DefaultResourceStyling } from './types'; import { useCalculateModelsStyling } from '../../hooks/useCalculateModelsStyling'; -import { useClickedNodeData } from '../..'; export const Reveal3DResources = ({ resources, defaultResourceStyling, instanceStyling, - onNodeClick, onResourcesAdded }: Reveal3DResourcesProps): ReactElement => { const [reveal3DModels, setReveal3DModels] = useState([]); @@ -47,13 +45,6 @@ export const Reveal3DResources = ({ }, [resources, viewer]); const reveal3DModelsStyling = useCalculateModelsStyling(reveal3DModels, instanceStyling ?? []); - const clickedNodeData = useClickedNodeData(); - - useEffect(() => { - if (clickedNodeData !== undefined) { - onNodeClick?.(Promise.resolve(clickedNodeData)); - } - }, [clickedNodeData, onNodeClick]); const image360CollectionAddOptions = resources.filter( (resource): resource is AddImageCollection360Options => diff --git a/react-components/src/components/Reveal3DResources/types.ts b/react-components/src/components/Reveal3DResources/types.ts index 16356a4258f..e6c59bcd882 100644 --- a/react-components/src/components/Reveal3DResources/types.ts +++ b/react-components/src/components/Reveal3DResources/types.ts @@ -45,6 +45,5 @@ export type Reveal3DResourcesProps = { resources: AddResourceOptions[]; defaultResourceStyling?: DefaultResourceStyling; instanceStyling?: FdmAssetStylingGroup[]; - onNodeClick?: (node: Promise) => void; onResourcesAdded?: () => void; };