sendou.ink/app/features/user-page/loaders/u.$identifier.vods.server.ts
Kalle 68aa12414a
New front page (#1938)
* Initial

* Progress

* Recent winners

* Add button

* Progress

* Mobile nav initial

* UI tweaks

* Overflow

* AnythingAdder links to places

* Remove color for tournament showcase

* Adjust SQ top banner based on if season is on right or not

* Tournament participant count fixed

* Log out

* todo

* Progress

* Nav complete

* Done?

* Fix lint

* Translate settings
2024-10-20 09:01:22 +03:00

16 lines
559 B
TypeScript

import type { LoaderFunctionArgs } from "@remix-run/node";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { findVods } from "~/features/vods/queries/findVods.server";
import { notFoundIfFalsy } from "~/utils/remix.server";
export const loader = async ({ params }: LoaderFunctionArgs) => {
const userId = notFoundIfFalsy(
await UserRepository.identifierToUserId(params.identifier!),
).id;
return {
// TODO: add pagination instead of not showing oldest vods at all
vods: findVods({ userId, limit: 100 }),
};
};