setWorkspace upon creation

pull/5370/head
yann300 4 years ago
parent 5c0a1b200e
commit b4b6d61bd5
  1. 4
      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()
})
}

Loading…
Cancel
Save