mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
refactor: remove NoSsr on top level (#1951)
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { useEffect } from 'react';
|
||||
|
||||
import { currentEditorAtom } from '../../atoms';
|
||||
|
||||
export function useReferenceLink(props?: {
|
||||
export function useReferenceLinkEffect(props?: {
|
||||
pageLinkClicked?: (params: { pageId: string }) => void;
|
||||
subpageLinked?: (params: { pageId: string }) => void;
|
||||
subpageUnlinked?: (params: { pageId: string }) => void;
|
||||
@@ -15,10 +15,8 @@ export function useToggleWorkspacePublish(workspace: AffineWorkspace) {
|
||||
public: isPublish,
|
||||
});
|
||||
await mutate(QueryKey.getWorkspaces);
|
||||
// force update
|
||||
jotaiStore.set(jotaiWorkspacesAtom, [
|
||||
...jotaiStore.get(jotaiWorkspacesAtom),
|
||||
]);
|
||||
// fixme: remove force update
|
||||
jotaiStore.set(jotaiWorkspacesAtom, ws => [...ws]);
|
||||
},
|
||||
[mutate, workspace.id]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user