mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 14:29:46 +02:00
Add migrate for base environment to sync logic
This commit is contained in:
@@ -26,7 +26,7 @@ export function useEnvironmentVariables(targetEnvironmentId: string | null) {
|
||||
|
||||
// Folder environments also can auto-complete from the active environment
|
||||
const activeEnvironmentVariables =
|
||||
targetEnvironment != null && isFolderEnvironment(targetEnvironment)
|
||||
targetEnvironment == null || isFolderEnvironment(targetEnvironment)
|
||||
? wrapVariables(activeEnvironment)
|
||||
: [];
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { useMemo } from 'react';
|
||||
export function useEnvironmentsBreakdown() {
|
||||
const allEnvironments = useAtomValue(environmentsAtom);
|
||||
return useMemo(() => {
|
||||
const baseEnvironments = allEnvironments.filter((e) => e.parentId == null) ?? [];
|
||||
const baseEnvironments = allEnvironments.filter((e) => e.parentModel == 'workspace') ?? [];
|
||||
const subEnvironments =
|
||||
allEnvironments.filter((e) => e.parentModel === 'environment' && e.parentId != null) ?? [];
|
||||
allEnvironments.filter((e) => e.parentModel === 'environment') ?? [];
|
||||
const folderEnvironments =
|
||||
allEnvironments.filter((e) => e.parentModel === 'folder' && e.parentId != null) ?? [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user