Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonflatval-cognite committed Jul 31, 2023
1 parent 6a309af commit 6a97f8e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright 2023 Cognite AS
*/

import { createContext, useContext, useState, useCallback, ReactElement } from 'react';
import { createContext, useContext, useState, useCallback, type ReactElement } from 'react';

export const AuxillaryDivProvider = ({ children }: { children: ReactElement }): ReactElement => {
const [elements, setElements] = useState<ReactElement[]>([]);
Expand Down
10 changes: 7 additions & 3 deletions react-components/src/components/ViewerAnchor/ViewerAnchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright 2023 Cognite AS
*/

import { useEffect, useRef, ReactElement } from 'react';
import { type RefObject, useEffect, useRef, type ReactElement } from 'react';
import { type Vector3 } from 'three';

import { useReveal } from '../RevealContainer/RevealContext';
Expand All @@ -11,7 +11,7 @@ import { HtmlOverlayTool } from '@cognite/reveal/tools';
import { useAuxillaryDivContext } from './AuxillaryDivProvider';

export type ViewerAnchorElementMapping = {
ref: React.RefObject<HTMLElement>;
ref: RefObject<HTMLElement>;
position: Vector3;
};

Expand All @@ -21,7 +21,11 @@ export type ViewerAnchorProps = {
uniqueKey: string;
};

export const ViewerAnchor = ({ position, children, uniqueKey }: ViewerAnchorProps): ReactElement => {
export const ViewerAnchor = ({
position,
children,
uniqueKey
}: ViewerAnchorProps): ReactElement => {
const viewer = useReveal();

const htmlTool = useRef<HtmlOverlayTool>(new HtmlOverlayTool(viewer));
Expand Down
7 changes: 3 additions & 4 deletions react-components/stories/ViewerAnchor.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ const meta = {
component: Reveal3DResources,
tags: ['autodocs'],
argTypes: {
styling: {
}
styling: {}
}
} satisfies Meta<typeof Reveal3DResources>;

Expand All @@ -38,9 +37,9 @@ export const Main: Story = {
space: 'hf_3d_schema',
version: '1',
type: 'view',
externalId: 'cdf_3d_connection_data',
externalId: 'cdf_3d_connection_data'
},
assetFdmSpace: 'hf_customer_a',
assetFdmSpace: 'hf_customer_a'
}
},
render: ({ resources, styling, fdmAssetMappingConfig }) => {
Expand Down

0 comments on commit 6a97f8e

Please sign in to comment.