sendou.ink/app/features/notifications/loaders/notifications.server.ts
Kalle 4ff0586ff8
Notifications (#2117)
* Initial

* Progress

* Fix

* Progress

* Notifications list page

* BADGE_MANAGER_ADDED

* Mark as seen initial

* Split tables

* Progress

* Fix styles

* Push notifs initial

* Progress

* Rename

* Routines

* Progress

* Add e2e tests

* Done?

* Try updating actions

* Consistency

* Dep fix

* A couple fixes
2025-03-01 13:59:34 +02:00

12 lines
400 B
TypeScript

import type { LoaderFunctionArgs } from "@remix-run/node";
import { requireUserId } from "~/features/auth/core/user.server";
import * as NotificationRepository from "../NotificationRepository.server";
export const loader = async ({ request }: LoaderFunctionArgs) => {
const user = await requireUserId(request);
return {
notifications: await NotificationRepository.findByUserId(user.id),
};
};