type and notification

pull/2353/head
Aniket-Engg 3 years ago
parent 4e3c483f2a
commit be9013997d
  1. 3
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -40,7 +40,7 @@ export const addInputField = async (type: 'file' | 'folder', path: string, cb?:
return promise
}
export const createWorkspace = async (workspaceName: string, workspaceTemplateName, isEmpty = false, cb?: (err: Error, result?: string | number | boolean | Record<string, any>) => void) => {
export const createWorkspace = async (workspaceName: string, workspaceTemplateName: WorkspaceTemplate, isEmpty = false, cb?: (err: Error, result?: string | number | boolean | Record<string, any>) => void) => {
await plugin.fileManager.closeAllFiles()
const promise = createWorkspaceTemplate(workspaceName, workspaceTemplateName)
@ -163,6 +163,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
}
}
} catch (e) {
dispatch(displayNotification('Workspace load error', e.message, 'OK', null, () => { dispatch(hideNotification()) }, null))
console.error(e)
}
break

Loading…
Cancel
Save