Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
gatzjames committed May 14, 2024
1 parent aa1374d commit 9f5701a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/insomnia/src/ui/components/command-palette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const CommandPaletteCombobox = ({ close }: { close: () => void }) => {
const remoteFiles = remoteFilesLoader.data?.files || [];

const currentFilesData = commandsLoader.data?.current.files || [];
const currentRemoteFilesData = remoteFiles.filter(file => file.item.teamProjectRemoteId === projectId).filter(file => !currentFilesData.some(f => f.id === file.item.id));
const currentRemoteFilesData = remoteFiles.filter(file => file.item.teamProjectLocalId === projectId).filter(file => !currentFilesData.some(f => f.id === file.item.id));

console.log({ currentFilesData });

Expand Down Expand Up @@ -171,7 +171,7 @@ const CommandPaletteCombobox = ({ close }: { close: () => void }) => {
})) || [];

const otherFilesData = commandsLoader.data?.other.files || [];
const otherRemoteFilesData = remoteFiles.filter(file => file.item.teamProjectRemoteId !== projectId).filter(file => !otherFilesData.some(f => f.id === file.item.id));
const otherRemoteFilesData = remoteFiles.filter(file => file.item.teamProjectLocalId !== projectId).filter(file => !otherFilesData.some(f => f.id === file.item.id));

const otherFiles = [...otherFilesData, ...otherRemoteFilesData].map(file => ({
...file,
Expand Down
4 changes: 2 additions & 2 deletions packages/insomnia/src/ui/routes/commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ interface RemoteFile {
}

export interface RemoteFilesLoaderResult {
files: CommandRemoteItem<RemoteFile & { teamProjectRemoteId: string; scope: 'unsynced' }>[];
files: CommandRemoteItem<RemoteFile & { teamProjectLocalId: string; scope: 'unsynced' }>[];
}

export const remoteFilesLoader: LoaderFunction = async (): Promise<RemoteFilesLoaderResult> => {
Expand Down Expand Up @@ -332,7 +332,7 @@ export const remoteFilesLoader: LoaderFunction = async (): Promise<RemoteFilesLo
url: `/organization/${file.organizationId}/project`,
pullUrl: parentProject ? `/organization/${file.organizationId}/project/${file.teamProjectId}/remote-collections/pull` : '',
name: file.name,
item: { ...file, teamProjectRemoteId: parentProject?._id || '', scope: 'unsynced' as const },
item: { ...file, teamProjectLocalId: parentProject?._id || '', scope: 'unsynced' as const },
organizationName: organizations.find(org => org.id === file.organizationId)?.display_name || '',
projectName: parentProject?.name || '',
};
Expand Down

0 comments on commit 9f5701a

Please sign in to comment.