Skip to content

Commit

Permalink
feat(core): add error boundary for ai-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
CatsJuice committed Apr 11, 2024
1 parent ef8c3d3 commit d20ed7a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
} from '@affine/component/setting-components';
import { Avatar } from '@affine/component/ui/avatar';
import { Button } from '@affine/component/ui/button';
import { SWRErrorBoundary } from '@affine/core/components/pure/swr-error-bundary';
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
import {
removeAvatarMutation,
Expand Down Expand Up @@ -257,9 +258,11 @@ export const AccountSetting: FC = () => {
<Suspense>
<StoragePanel />
</Suspense>
<Suspense>
<AIUsagePanel />
</Suspense>
<SWRErrorBoundary fallback={<div />}>
<Suspense>
<AIUsagePanel />
</Suspense>
</SWRErrorBoundary>
<SettingRow
name={t[`Sign out`]()}
desc={t['com.affine.setting.sign.out.message']()}
Expand Down

0 comments on commit d20ed7a

Please sign in to comment.