mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 12:52:57 +03:00
fix: add judgement of currentWorkspace
This commit is contained in:
parent
f1ea2ee691
commit
b86a03642a
@ -40,7 +40,7 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceInfo }) => {
|
||||
confirmText: user ? 'Enable' : 'Sign in and Enable',
|
||||
cancelText: 'Skip',
|
||||
}).then(async confirm => {
|
||||
if (confirm) {
|
||||
if (confirm && currentWorkspace) {
|
||||
// if (user) {
|
||||
// await login();
|
||||
// }
|
||||
|
@ -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 ? (
|
||||
|
@ -31,7 +31,7 @@ const Page: NextPageWithLayout = () => {
|
||||
<EditorHeader />
|
||||
<MobileModal />
|
||||
|
||||
{currentPage && (
|
||||
{currentPage && currentWorkspace && (
|
||||
<DynamicBlocksuite
|
||||
page={currentPage}
|
||||
workspace={currentWorkspace}
|
||||
|
Loading…
Reference in New Issue
Block a user