♻️ (editor) Improve webhook creation
Remove terrible useEffects
This commit is contained in:
@ -223,7 +223,12 @@ export const Graph = ({
|
||||
const zoomOut = () => zoom({ delta: -zoomButtonsScaleBlock })
|
||||
|
||||
return (
|
||||
<Flex ref={graphContainerRef} position="relative" {...props}>
|
||||
<Flex
|
||||
ref={graphContainerRef}
|
||||
position="relative"
|
||||
style={{ touchAction: 'none' }}
|
||||
{...props}
|
||||
>
|
||||
<ZoomButtons onZoomInClick={zoomIn} onZoomOutClick={zoomOut} />
|
||||
<Flex
|
||||
flex="1"
|
||||
|
@ -16,7 +16,6 @@ import {
|
||||
Block,
|
||||
BlockOptions,
|
||||
BlockWithOptions,
|
||||
Webhook,
|
||||
} from 'models'
|
||||
import { useRef } from 'react'
|
||||
import { DateInputSettingsBody } from '@/features/blocks/inputs/date'
|
||||
@ -45,7 +44,6 @@ import { ScriptSettings } from '@/features/blocks/logic/script/components/Script
|
||||
|
||||
type Props = {
|
||||
block: BlockWithOptions
|
||||
webhook?: Webhook
|
||||
onExpandClick: () => void
|
||||
onBlockChange: (updates: Partial<Block>) => void
|
||||
}
|
||||
@ -93,7 +91,6 @@ export const BlockSettings = ({
|
||||
onBlockChange,
|
||||
}: {
|
||||
block: BlockWithOptions
|
||||
webhook?: Webhook
|
||||
onBlockChange: (block: Partial<Block>) => void
|
||||
}): JSX.Element => {
|
||||
const handleOptionsChange = (options: BlockOptions) => {
|
||||
|
@ -195,6 +195,7 @@ const NonMemoizedDraggableGroupNode = ({
|
||||
transform: `translate(${currentCoordinates?.x ?? 0}px, ${
|
||||
currentCoordinates?.y ?? 0
|
||||
}px)`,
|
||||
touchAction: 'none',
|
||||
}}
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
|
Reference in New Issue
Block a user