Skip to content

Commit

Permalink
break: remove onNodeClick
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonflatval-cognite committed Aug 23, 2023
1 parent 188139c commit fab669f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<TypedReveal3DModel[]>([]);
Expand All @@ -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 =>
Expand Down
1 change: 0 additions & 1 deletion react-components/src/components/Reveal3DResources/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ export type Reveal3DResourcesProps = {
resources: AddResourceOptions[];
defaultResourceStyling?: DefaultResourceStyling;
instanceStyling?: FdmAssetStylingGroup[];
onNodeClick?: (node: Promise<NodeDataResult | undefined>) => void;
onResourcesAdded?: () => void;
};

0 comments on commit fab669f

Please sign in to comment.