2
0

♻️ (editor) Improve webhook creation

Remove terrible useEffects
This commit is contained in:
Baptiste Arnaud
2023-02-15 14:51:58 +01:00
parent 6e066c44e1
commit ac464eabdf
23 changed files with 481 additions and 528 deletions

View File

@ -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"

View File

@ -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) => {

View File

@ -195,6 +195,7 @@ const NonMemoizedDraggableGroupNode = ({
transform: `translate(${currentCoordinates?.x ?? 0}px, ${
currentCoordinates?.y ?? 0
}px)`,
touchAction: 'none',
}}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}