update to nuxt 4

This commit is contained in:
DecDuck
2025-09-20 11:20:49 +10:00
parent b4f9b77809
commit 2db8e753b7
313 changed files with 508 additions and 512 deletions

View File

@ -0,0 +1,12 @@
import type { NotificationModel } from "~~/prisma/client/models";
const ws = new WebSocketHandler("/api/v1/notifications/ws");
export const useNotifications = () =>
useState<Array<NotificationModel>>("notifications", () => []);
ws.listen((e) => {
const notification = JSON.parse(e) as NotificationModel;
const notifications = useNotifications();
notifications.value.push(notification);
});