|
|
@ -26,7 +26,11 @@ export function Workspace () { |
|
|
|
const initGitRepoRef = useRef<HTMLInputElement>() |
|
|
|
const initGitRepoRef = useRef<HTMLInputElement>() |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
setCurrentWorkspace(localStorage.getItem('currentWorkspace') ? localStorage.getItem('currentWorkspace') : '') |
|
|
|
let workspaceName = localStorage.getItem('currentWorkspace') |
|
|
|
|
|
|
|
if (!workspaceName && global.fs.browser.workspaces.length) { |
|
|
|
|
|
|
|
workspaceName = global.fs.browser.workspaces[0].name |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setCurrentWorkspace(workspaceName) |
|
|
|
resetFocus() |
|
|
|
resetFocus() |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|