mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(component): new notification center implemented with sonner (#6416)
The Notification has been reimplemented using sooner, no longer relies on jotai, and new story has been added.
- Before
```ts
import { pushNotificationAtom } from '@affine/component/notification-center';
import { useSetAtom } from 'jotai';
export const Component = () => {
const pushNotification = useSetAtom(pushNotificationAtom);
pushNotification({ ... });
}
```
- After
```ts
import { notify } from "@affine/component";
export const Component = () => {
notify({ ... });
}
```
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
"react-transition-state": "^2.1.1",
|
||||
"react-virtuoso": "^4.7.0",
|
||||
"rxjs": "^7.8.1",
|
||||
"sonner": "^1.4.41",
|
||||
"swr": "^2.2.5",
|
||||
"uuid": "^9.0.1",
|
||||
"zod": "^3.22.4"
|
||||
|
||||
Reference in New Issue
Block a user