diff --git a/src/components/Universe/Graph/Cubes/SelectionDataNodes/Node/index.tsx b/src/components/Universe/Graph/Cubes/SelectionDataNodes/Node/index.tsx index 0ee10a8911..e284a2e930 100644 --- a/src/components/Universe/Graph/Cubes/SelectionDataNodes/Node/index.tsx +++ b/src/components/Universe/Graph/Cubes/SelectionDataNodes/Node/index.tsx @@ -14,7 +14,6 @@ import NodesIcon from '~/components/Icons/NodesIcon' import PlusIcon from '~/components/Icons/PlusIcon' import { useNodeNavigation } from '~/components/Universe/useNodeNavigation' import { getActionDetails } from '~/network/actions' -import { useSelectedNode } from '~/stores/useGraphStore' import { useModal } from '~/stores/useModalStore' import { useSchemaStore } from '~/stores/useSchemaStore' import { useUserStore } from '~/stores/useUserStore' @@ -38,20 +37,11 @@ type Props = { id: string } -type ButtonProps = { - left: number - backgroundColor?: string - borderColor?: string - fontColor?: string -} - export const Node = ({ onClick, node, selected, rounded = true, x, y, z, id }: Props) => { const nodeRef = useRef(null) const [isAdmin] = useUserStore((s) => [s.isAdmin]) const { open: openEditNodeNameModal } = useModal('editNodeName') - const { open: createBountyModal } = useModal('createBounty') const { open: openNodeActionModal } = useModal('nodeAction') - const selectedNode = useSelectedNode() const [anchorEl, setAnchorEl] = useState(null) const [nodeActions, setNodeActions] = useState() const [loadingActions, setLoadingActions] = useState(false) @@ -117,8 +107,6 @@ export const Node = ({ onClick, node, selected, rounded = true, x, y, z, id }: P const description = keyProperty !== 'description' ? node.properties?.description : '' const descriptionShortened = description ? truncateText(description, 60) : '' - const isShowCreateTestButton = !!(selectedNode && selectedNode?.node_type?.toLowerCase() === 'function') - return ( @@ -182,17 +170,6 @@ export const Node = ({ onClick, node, selected, rounded = true, x, y, z, id }: P {titleShortened} {descriptionShortened ? {descriptionShortened} : null} - - {isShowCreateTestButton && ( - { - createBountyModal() - }} - > - Generate Unit Test - - )} ) : ( <> @@ -350,28 +327,6 @@ const Avatar = styled(Flex)` font-size: 20px; ` -const CreateTestButton = styled.div` - position: absolute; - top: 170px; - left: ${(p: ButtonProps) => 30 + p.left}px; - width: 140px; - padding: 8px; - border-radius: 4px; - display: flex; - justify-content: center; - align-items: center; - background: ${colors.createTestButton}; - color: ${colors.black}; - font-size: 14px; - font-family: Barlow; - font-weight: 600; - z-index: 1002; - cursor: pointer; - &:hover { - transform: scale(1.05); - } -` - const PopoverOption = styled(Flex).attrs({ direction: 'row', px: 12,