feat(notification): base notifcaiton sub and admin compelted
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m59s

can now sub to a notification and user can remove them selfs plus an admin can remove,updates to add
new emails are good as well
This commit is contained in:
2026-04-06 12:59:30 -05:00
parent 637de857f9
commit 5865ac3b99
9 changed files with 376 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ import { notifications } from "../../../lib/queries/notifications";
export default function NotificationsSubCard({ user }: any) {
const { data } = useSuspenseQuery(notifications());
const { data: ns, refetch } = useSuspenseQuery(notificationSubs(user.id));
const { refetch } = useSuspenseQuery(notificationSubs(user.id));
const form = useAppForm({
defaultValues: {
notificationId: "",
@@ -32,8 +32,11 @@ export default function NotificationsSubCard({ user }: any) {
withCredentials: true,
});
refetch();
form.reset();
if (res.status === 200) {
toast.success("Notification Subbed");
refetch();
form.reset();
}
} catch (error) {
console.error(error);
}