From b4b6d61bd5cb9cb539f74c56caeabf0a53bf82e5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 1 Mar 2021 10:19:11 +0100 Subject: [PATCH] setWorkspace upon creation --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 10b663ee75..45e3cd7976 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -156,14 +156,14 @@ export const Workspace = (props: WorkspaceProps) => { const workspacesPath = props.workspace.workspacesPath props.browser.createDir(workspacesPath + '/' + workspaceName, async () => { + await setWorkspace(workspaceName) for (const file in props.examples) { try { - await props.fileManager.writeFile('browser/' + workspacesPath + '/' + workspaceName + '/' + props.examples[file].name, props.examples[file].content) + await props.fileManager.writeFile(props.examples[file].name, props.examples[file].content) } catch (error) { console.error(error) } } - props.plugin.getWorkspaces() }) }