Skip to content

Commit

Permalink
feat: remove extra card
Browse files Browse the repository at this point in the history
  • Loading branch information
Rassl committed Dec 13, 2024
1 parent 2446a36 commit 2dece93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions src/components/mindset/components/Scene/Board/Node/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Html } from '@react-three/drei'
import { useThree } from '@react-three/fiber'
import { memo, useState } from 'react'
import { memo } from 'react'
import { Flex } from '~/components/common/Flex'
import { HoverCard } from '../../../../../Universe/CursorTooltip/HoverCard'
import { RoundedRectangle } from '../RoundedRectangle'
import { Content } from './Content'
import { Image } from './Image'
Expand All @@ -16,12 +15,10 @@ type Props = {
name: string
type: string
color: string
description?: string
}

export const Node = memo(({ width, height, position, url, onButtonClick, name, type, color, description }: Props) => {
export const Node = memo(({ width, height, position, url, onButtonClick, name, type, color }: Props) => {
const { camera } = useThree()
const [isHovered, setIsHovered] = useState(false)

return (
<group position={position}>
Expand All @@ -33,8 +30,6 @@ export const Node = memo(({ width, height, position, url, onButtonClick, name, t
<Html position={[-width / 2, height / 2, 0]}>
<Flex
onClick={() => onButtonClick()}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
style={{
fontSize: '12px',
color: 'white',
Expand All @@ -49,7 +44,6 @@ export const Node = memo(({ width, height, position, url, onButtonClick, name, t
}}
>
<Content name={`${name}`} type={type || ''} url={url} />
{isHovered && <HoverCard description={description} title={name} />}
</Flex>
</Html>
</group>
Expand Down
2 changes: 0 additions & 2 deletions src/components/mindset/components/Scene/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export const Board = () => {
<Fragment key={node.ref_id}>
<Node
color="#353A46"
description={node?.properties?.description}
height={nodeHeight}
name={node?.properties?.name || ''}
onButtonClick={console.log}

Check warning on line 127 in src/components/mindset/components/Scene/Board/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement
Expand All @@ -137,7 +136,6 @@ export const Board = () => {
<Node
key={`${relatedNode.ref_id}-${node.ref_id}`}
color="#353A46"
description={relatedNode?.properties?.description}
height={nodeHeight}
name={relatedNode?.properties?.name || ''}
onButtonClick={console.log}

Check warning on line 141 in src/components/mindset/components/Scene/Board/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement
Expand Down

0 comments on commit 2dece93

Please sign in to comment.