Skip to content

Commit 22598f5

Browse files
MrFlashAccountfarmaazon
authored andcommitted
Fix dowloading projects from cloud (#12770)
Closes: enso-org/cloud-v2#1888
1 parent d3198e9 commit 22598f5

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

app/gui/src/dashboard/layouts/AssetContextMenu.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/** @file The context menu for an arbitrary {@link backendModule.Asset}. */
22
import * as React from 'react'
33

4-
import * as reactQuery from '@tanstack/react-query'
54
import * as toast from 'react-toastify'
65

76
import { useCopy } from '#/hooks/copyHooks'
@@ -133,22 +132,9 @@ export default function AssetContextMenu(props: AssetContextMenuProps) {
133132
)
134133
})
135134

136-
const { data } = reactQuery.useQuery({
137-
...projectHooks.createGetProjectDetailsQuery({
138-
// This is safe because we disable the query when the asset is not a project.
139-
// see `enabled` property below.
140-
// eslint-disable-next-line no-restricted-syntax
141-
assetId: asset.id as backendModule.ProjectId,
142-
backend,
143-
}),
144-
enabled: asset.type === backendModule.AssetType.project && canOpenProjects,
145-
})
146-
147135
const isRunningProject =
148-
(asset.type === backendModule.AssetType.project &&
149-
data &&
150-
backendModule.IS_OPENING_OR_OPENED[data.state.type]) ??
151-
false
136+
asset.type === backendModule.AssetType.project &&
137+
backendModule.IS_OPENING_OR_OPENED[asset.projectState.type]
152138

153139
const canExecute =
154140
category.type !== 'trash' &&

app/ide-desktop/client/src/security.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const TRUSTED_HOSTS = [
1616
'github.com',
1717
'production-enso-domain.auth.eu-west-1.amazoncognito.com',
1818
'production-enso-organizations-files.s3.amazonaws.com',
19+
'production-enso-projects-templates.s3.eu-west-1.amazonaws.com',
1920
'pb-enso-domain.auth.eu-west-1.amazoncognito.com',
2021
'7aqkn3tnbc.execute-api.eu-west-1.amazonaws.com',
2122
'lkxuay3ha1.execute-api.eu-west-1.amazonaws.com',

0 commit comments

Comments
 (0)