mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
chore: bump blocksuite (#6448)
## Features - https://github.com/toeverything/BlockSuite/pull/6679 @pengx17 - https://github.com/toeverything/BlockSuite/pull/6620 @doouding - https://github.com/toeverything/BlockSuite/pull/6602 @golok727 - https://github.com/toeverything/BlockSuite/pull/6661 @Flrande - https://github.com/toeverything/BlockSuite/pull/6591 @fundon - https://github.com/toeverything/BlockSuite/pull/6634 @golok727 - https://github.com/toeverything/BlockSuite/pull/6626 @regischen - https://github.com/toeverything/BlockSuite/pull/6630 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6605 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6614 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6508 @doouding - https://github.com/toeverything/BlockSuite/pull/6578 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6572 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6571 @golok727 - https://github.com/toeverything/BlockSuite/pull/6573 @fundon - https://github.com/toeverything/BlockSuite/pull/6580 @Flrande - https://github.com/toeverything/BlockSuite/pull/6540 @golok727 - https://github.com/toeverything/BlockSuite/pull/6567 @Flrande - https://github.com/toeverything/BlockSuite/pull/6565 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6561 @zzj3720 ## Bugfix - https://github.com/toeverything/BlockSuite/pull/6677 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6681 @fundon - https://github.com/toeverything/BlockSuite/pull/6673 @fundon - https://github.com/toeverything/BlockSuite/pull/6652 @fundon - https://github.com/toeverything/BlockSuite/pull/6641 @fourdim - https://github.com/toeverything/BlockSuite/pull/6649 @golok727 - https://github.com/toeverything/BlockSuite/pull/6648 @doouding - https://github.com/toeverything/BlockSuite/pull/6662 @Flrande - https://github.com/toeverything/BlockSuite/pull/6659 @zkwolf - https://github.com/toeverything/BlockSuite/pull/6644 @doouding - https://github.com/toeverything/BlockSuite/pull/6633 @golok727 - https://github.com/toeverything/BlockSuite/pull/6632 @golok727 - https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa - https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa - https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa - https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa - https://github.com/toeverything/BlockSuite/pull/6622 @RubaXa - https://github.com/toeverything/BlockSuite/pull/6600 @fourdim - https://github.com/toeverything/BlockSuite/pull/6617 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6618 @Flrande - https://github.com/toeverything/BlockSuite/pull/6576 @fundon - https://github.com/toeverything/BlockSuite/pull/6595 @fundon - https://github.com/toeverything/BlockSuite/pull/6596 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6574 @fundon - https://github.com/toeverything/BlockSuite/pull/6593 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6588 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6590 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6589 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6584 @lawvs - https://github.com/toeverything/BlockSuite/pull/6579 @fundon - https://github.com/toeverything/BlockSuite/pull/6538 @golok727 - https://github.com/toeverything/BlockSuite/pull/6570 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6569 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6564 @zzj3720 - https://github.com/toeverything/BlockSuite/pull/6563 @zzj3720 ## Refactor - https://github.com/toeverything/BlockSuite/pull/6683 @doodlewind - https://github.com/toeverything/BlockSuite/pull/6668 @Flrande - https://github.com/toeverything/BlockSuite/pull/6635 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6653 @fundon - https://github.com/toeverything/BlockSuite/pull/6615 @Flrande - https://github.com/toeverything/BlockSuite/pull/6534 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6553 @golok727 ## Misc - chore(examples): cleanup types - https://github.com/toeverything/BlockSuite/pull/6664 @fourdim - https://github.com/toeverything/BlockSuite/pull/6657 @fourdim - https://github.com/toeverything/BlockSuite/pull/6654 @fourdim - https://github.com/toeverything/BlockSuite/pull/6587 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6562 @donteatfriedrice
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { getBaseUrl } from '@affine/graphql';
|
||||
import { AIProvider } from '@blocksuite/presets';
|
||||
import { useEffect, useMemo, useReducer } from 'react';
|
||||
import useSWR from 'swr';
|
||||
|
||||
@@ -149,7 +150,12 @@ export function useCurrentUser(): CheckedUser {
|
||||
// maybe lift user state up to global state?
|
||||
useEffect(() => {
|
||||
if (session.user) {
|
||||
dispatcher({ type: 'update', payload: session.user });
|
||||
const user = session.user;
|
||||
dispatcher({ type: 'update', payload: user });
|
||||
// todo: move this to a better place!
|
||||
AIProvider.provideUserInfo(() => {
|
||||
return user;
|
||||
});
|
||||
} else {
|
||||
dispatcher({ type: 'fetchError', payload: null });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user