File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]/w/[workflowId]/components/panel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import {
4141} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/hooks'
4242import { Variables } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables'
4343import { useAutoLayout } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout'
44+ import { useCurrentWorkflow } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-current-workflow'
4445import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution'
4546import { getWorkflowLockToggleIds } from '@/app/workspace/[workspaceId]/w/[workflowId]/utils'
4647import { useDeleteWorkflow , useImportWorkflow } from '@/app/workspace/[workspaceId]/w/hooks'
@@ -203,6 +204,7 @@ export const Panel = memo(function Panel() {
203204 )
204205
205206 const currentWorkflow = activeWorkflowId ? workflows [ activeWorkflowId ] : null
207+ const { isSnapshotView } = useCurrentWorkflow ( )
206208
207209 /**
208210 * Mark hydration as complete on mount
@@ -421,7 +423,7 @@ export const Panel = memo(function Panel() {
421423 < Layout className = 'h-3 w-3' animate = { isAutoLayouting } variant = 'clockwise' />
422424 < span > Auto layout</ span >
423425 </ PopoverItem >
424- { userPermissions . canAdmin && ! currentWorkflow ?. isSnapshotView && (
426+ { userPermissions . canAdmin && ! isSnapshotView && (
425427 < PopoverItem onClick = { handleToggleWorkflowLock } disabled = { ! hasBlocks } >
426428 { allBlocksLocked ? (
427429 < Unlock className = 'h-3 w-3' />
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const SUPPORTED_LANGUAGES = [
135135 { label : 'Yiddish' , id : 'yi' } ,
136136 { label : 'Yoruba' , id : 'yo' } ,
137137 { label : 'Zulu' , id : 'zu' } ,
138- ] as const
138+ ] satisfies { label : string ; id : string } [ ]
139139
140140export const GoogleTranslateBlock : BlockConfig = {
141141 type : 'google_translate' ,
You can’t perform that action at this time.
0 commit comments