Skip to content

Commit ec5be0a

Browse files
committed
refact
1 parent 05e0c1d commit ec5be0a

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/ContentItem/contentItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import { getRankGrade } from '../../utils/search/utils';
1313
import ContentIpfs from '../contentIpfs/contentIpfs';
1414

1515
type ContentItemProps = {
16-
item: $TsFixMe;
16+
item?: $TsFixMe;
1717
cid: string;
1818
grade?: $TsFixMe;
1919
className?: string;
2020
parent?: string;
21-
linkType: LinksType;
21+
linkType?: LinksType;
2222
setType?: (type: IpfsContentType) => void;
2323
};
2424

@@ -35,7 +35,7 @@ function ContentItem({
3535

3636
useEffect(() => {
3737
details?.type && setType && setType(details?.type);
38-
}, [details]); //TODO: REFACT - setType rise infinite loop
38+
}, [details]); // TODO: REFACT - setType rise infinite loop
3939

4040
if (hidden) {
4141
return <div />;

src/features/cyberlinks/CyberlinksGraph/GraphHoverInfo/GraphHoverInfo.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as THREE from 'three';
22
import ContentItem from 'src/components/ContentItem/contentItem';
3-
import { Display } from 'src/components';
43
import { useMemo } from 'react';
54
import styles from './GraphHoverInfo.module.scss';
65

@@ -41,6 +40,11 @@ function HoverInfo({ node, camera, size }: Props) {
4140

4241
const isCid = node.id.startsWith('Qm');
4342

43+
if (!isCid) {
44+
// debug, delete
45+
debugger;
46+
}
47+
4448
return (
4549
<div
4650
className={styles.hoverInfo}
@@ -49,7 +53,7 @@ function HoverInfo({ node, camera, size }: Props) {
4953
left: posX,
5054
}}
5155
>
52-
{isCid ? <ContentItem cid={node.id} /> : <Display>{node.id}</Display>}
56+
<ContentItem cid={node.id} />
5357
</div>
5458
);
5559
}

0 commit comments

Comments
 (0)