Skip to content

Commit d26e280

Browse files
committed
fix: padding for steps without connection
1 parent fa1b692 commit d26e280

File tree

1 file changed

+4
-1
lines changed
  • packages/frontend/src/components/EditorRightDrawer

1 file changed

+4
-1
lines changed

packages/frontend/src/components/EditorRightDrawer/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useContext, useMemo } from 'react'
44
import { Flex } from '@chakra-ui/react'
55

66
import { EditorContext } from '@/contexts/Editor'
7+
import { useStepMetadata } from '@/hooks/useStepMetadata'
78

89
import Step from './Step'
910
import StepHeader from './StepHeader'
@@ -17,11 +18,12 @@ interface EditorRightDrawerProps {
1718
export default function EditorRightDrawer(props: EditorRightDrawerProps) {
1819
const { index, steps } = props
1920

20-
const { currentStepId } = useContext(EditorContext)
21+
const { allApps, currentStepId } = useContext(EditorContext)
2122

2223
const step = useMemo(() => {
2324
return steps.find((step) => step.id === currentStepId)
2425
}, [currentStepId, steps])
26+
const { hasConnection } = useStepMetadata(allApps, step)
2527

2628
if (!currentStepId || !step) {
2729
return null
@@ -36,6 +38,7 @@ export default function EditorRightDrawer(props: EditorRightDrawerProps) {
3638
overflowX="hidden"
3739
position="relative"
3840
px="4"
41+
pt={hasConnection ? 0 : 4}
3942
top="2.5rem"
4043
>
4144
<Step step={step} isLastStep={index === steps.length - 1} />

0 commit comments

Comments
 (0)