mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 21:25:45 +08:00
fix: add judgement of currentWorkspace
This commit is contained in:
@@ -42,14 +42,15 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
|
||||
};
|
||||
const handleUpdateWorkspaceName = () => {
|
||||
console.log('currentWorkspace: ', currentWorkspace);
|
||||
updateWorkspace({ name: workspaceName }, currentWorkspace);
|
||||
currentWorkspace &&
|
||||
updateWorkspace({ name: workspaceName }, currentWorkspace);
|
||||
};
|
||||
|
||||
const fileChange = async (file: File) => {
|
||||
// console.log('file: ', file);
|
||||
// setUploading(true);
|
||||
const blob = new Blob([file], { type: file.type });
|
||||
updateWorkspace({ avatarBlob: blob }, currentWorkspace);
|
||||
currentWorkspace && updateWorkspace({ avatarBlob: blob }, currentWorkspace);
|
||||
};
|
||||
|
||||
return workspace ? (
|
||||
|
||||
Reference in New Issue
Block a user