Skip to content

Commit 087b291

Browse files
committed
wait for install
1 parent 65df6c2 commit 087b291

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/main/src/modules/cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { DeployOptions } from '/shared/types/ipc';
22
import { run, type Child } from './bin';
33
import { getAvailablePort } from './port';
4-
import { install } from './npm';
54
import { getProjectId } from './analytics';
65

76
async function getEnv(path: string) {
@@ -26,7 +25,6 @@ export async function start(path: string) {
2625
if (previewServer) {
2726
await previewServer.kill();
2827
}
29-
await install(path);
3028
previewServer = run('@dcl/sdk-commands', 'sdk-commands', {
3129
args: ['start', '--explorer-alpha', '--hub'],
3230
cwd: path,

packages/renderer/src/components/EditorPage/component.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function EditorPage() {
3838
updateScene,
3939
loadingPreview,
4040
loadingPublish,
41+
isInstalling,
4142
} = useEditor();
4243
const userId = useSelector(state => state.analytics.userId);
4344
const iframeRef = useRef<ReturnType<typeof initRpc>>();
@@ -167,17 +168,17 @@ export function EditorPage() {
167168
</Button>
168169
<Button
169170
color="secondary"
170-
disabled={loadingPreview}
171+
disabled={loadingPreview || isInstalling}
171172
onClick={openPreview}
172-
startIcon={loadingPreview ? <Loader size={20} /> : <PlayCircleIcon />}
173+
startIcon={(loadingPreview || isInstalling) ? <Loader size={20} /> : <PlayCircleIcon />}
173174
>
174175
{t('editor.header.actions.preview')}
175176
</Button>
176177
<Button
177178
color="primary"
178-
disabled={loadingPublish}
179+
disabled={loadingPublish || isInstalling}
179180
onClick={handleOpenModal('publish')}
180-
startIcon={loadingPublish ? <Loader size={20} /> : <PublicIcon />}
181+
startIcon={(loadingPublish || isInstalling) ? <Loader size={20} /> : <PublicIcon />}
181182
>
182183
{t('editor.header.actions.publish')}
183184
</Button>

0 commit comments

Comments
 (0)