Skip to content

Commit cc6c1d8

Browse files
committed
fixed type errors
1 parent 696547c commit cc6c1d8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/hooks'
4242
import { Variables } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables'
4343
import { useAutoLayout } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout'
44+
import { useCurrentWorkflow } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-current-workflow'
4445
import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution'
4546
import { getWorkflowLockToggleIds } from '@/app/workspace/[workspaceId]/w/[workflowId]/utils'
4647
import { 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' />

apps/sim/blocks/blocks/google_translate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

140140
export const GoogleTranslateBlock: BlockConfig = {
141141
type: 'google_translate',

0 commit comments

Comments
 (0)