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 Sep 13, 2023
1 parent ab43dc5 commit fe3ce1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export function NodeCacheProvider({ children }: { children?: ReactNode }): React
const revealKeepAliveData = useRevealKeepAlive();

const fdmCache = useMemo(() => {
const cache = revealKeepAliveData?.fdmNodeCache.current ?? new FdmNodeCache(cdfClient, fdmClient);
const cache =
revealKeepAliveData?.fdmNodeCache.current ?? new FdmNodeCache(cdfClient, fdmClient);
if (revealKeepAliveData !== undefined) {
revealKeepAliveData.fdmNodeCache.current = cache;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { type Cognite3DViewer } from '@cognite/reveal';
import { type ReactNode, type ReactElement, useRef, useEffect } from 'react';
import { RevealKeepAliveContext } from './RevealKeepAliveContext';
import { FdmNodeCache } from '../NodeCacheProvider/FdmNodeCache';
import { type FdmNodeCache } from '../NodeCacheProvider/FdmNodeCache';

export function RevealKeepAlive({ children }: { children?: ReactNode }): ReactElement {
const viewerRef = useRef<Cognite3DViewer>();
Expand All @@ -19,7 +19,8 @@ export function RevealKeepAlive({ children }: { children?: ReactNode }): ReactEl
};
}, []);
return (
<RevealKeepAliveContext.Provider value={{ viewerRef, isRevealContainerMountedRef, fdmNodeCache }}>
<RevealKeepAliveContext.Provider
value={{ viewerRef, isRevealContainerMountedRef, fdmNodeCache }}>
{children}
</RevealKeepAliveContext.Provider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { type Cognite3DViewer } from '@cognite/reveal';
import { type MutableRefObject, createContext, useContext } from 'react';
import { FdmNodeCache } from '../NodeCacheProvider/FdmNodeCache';
import { type FdmNodeCache } from '../NodeCacheProvider/FdmNodeCache';

export type RevealKeepAliveData = {
viewerRef: MutableRefObject<Cognite3DViewer | undefined>;
Expand Down

0 comments on commit fe3ce1d

Please sign in to comment.