mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-30 05:34:21 +03:00
fix:delete bugs
This commit is contained in:
parent
855ad54fe1
commit
2773b3e489
@ -8,13 +8,16 @@ export const WorkspaceSelector = () => {
|
|||||||
const [workspaceListShow, setWorkspaceListShow] = useState(false);
|
const [workspaceListShow, setWorkspaceListShow] = useState(false);
|
||||||
const [workspace, setWorkSpace] = useState(getActiveWorkspace());
|
const [workspace, setWorkSpace] = useState(getActiveWorkspace());
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getWorkspace();
|
setWorkspace();
|
||||||
}, [workspaceListShow]);
|
}, [workspaceListShow]);
|
||||||
const workspaceList = getWorkspaces();
|
useEffect(() => {
|
||||||
if (workspaceList.length === 0) {
|
const workspaceList = getWorkspaces();
|
||||||
setWorkspaceListShow(true);
|
if (workspaceList.length === 0) {
|
||||||
}
|
setWorkspaceListShow(true);
|
||||||
const getWorkspace = () => {
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const setWorkspace = () => {
|
||||||
const workspace = getActiveWorkspace();
|
const workspace = getActiveWorkspace();
|
||||||
setWorkSpace(workspace);
|
setWorkSpace(workspace);
|
||||||
};
|
};
|
||||||
@ -42,7 +45,7 @@ export const WorkspaceSelector = () => {
|
|||||||
open={workspaceListShow}
|
open={workspaceListShow}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
setWorkspaceListShow(false);
|
setWorkspaceListShow(false);
|
||||||
getWorkspace();
|
setWorkspace();
|
||||||
}}
|
}}
|
||||||
></WorkspaceModal>
|
></WorkspaceModal>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user