@@ -3,11 +3,11 @@ import { create } from 'zustand'
33import { devtools } from 'zustand/middleware'
44import { DEFAULT_DUPLICATE_OFFSET } from '@/lib/workflows/autolayout/constants'
55import { getQueryClient } from '@/app/_shell/providers/get-query-client'
6+ import type { WorkflowDeploymentInfo } from '@/hooks/queries/deployments'
7+ import { deploymentKeys } from '@/hooks/queries/deployments'
68import { invalidateWorkflowLists } from '@/hooks/queries/utils/invalidate-workflow-lists'
79import { useVariablesStore } from '@/stores/panel/variables/store'
810import type { Variable } from '@/stores/panel/variables/types'
9- import type { WorkflowDeploymentInfo } from '@/hooks/queries/deployments'
10- import { deploymentKeys } from '@/hooks/queries/deployments'
1111import type { HydrationState , WorkflowRegistry } from '@/stores/workflows/registry/types'
1212import { useSubBlockStore } from '@/stores/workflows/subblock/store'
1313import { getUniqueBlockName , regenerateBlockIds } from '@/stores/workflows/utils'
@@ -104,7 +104,7 @@ export const useWorkflowRegistry = create<WorkflowRegistry>()(
104104 ( prev ) => ( {
105105 isDeployed : workflowData . isDeployed ?? false ,
106106 deployedAt : workflowData . deployedAt ?? null ,
107- apiKey : prev ?. apiKey ?? null ,
107+ apiKey : workflowData . apiKey ?? prev ?. apiKey ?? null ,
108108 needsRedeployment : prev ?. needsRedeployment ?? false ,
109109 isPublicApi : prev ?. isPublicApi ?? false ,
110110 } )
0 commit comments