mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-15 15:32:39 -05:00
* YouTube lite embed + CSS bundled import * Migration initial * New VoD page initial functioning * Table changes + add TODOs * New structure for add vod page * WIP add new VoD backend * Merge branch 'rewrite' of https://github.com/Sendouc/sendou.ink into vods * Fix when leaderboard appears * Function new vod form * Single vod page initial * Different YouTubeEmbed * Scroll to top when going to timestamp * Vod match weapon/mode icons * Vod page user * Add date to vod page * Adjust migration order * Vod page many weapons * Add title to vod page * New vods page cast many weapons * Add player index to order by * Vods new more validation * Vod listing page initial * Vods page with filters * Show message if no vods * Fix not being to unset filters * Fix seed sometimes throwing errors * User page VoDs * Vods nullable weapon combobox * Link directly to user custom url from vod page * Make video adder admin action * Can add video checks * i18n * New VoD form tests * VoD operates filters test * Vods behind flag * Remove from config
30 lines
871 B
TypeScript
30 lines
871 B
TypeScript
import type { LinksFunction } from "@remix-run/node";
|
|
import { useMatches } from "@remix-run/react";
|
|
import invariant from "tiny-invariant";
|
|
import { VodListing } from "~/features/vods";
|
|
import type { SendouRouteHandle } from "~/utils/remix";
|
|
import styles from "../../features/vods/vods.css";
|
|
import type { UserPageLoaderData } from "../u.$identifier";
|
|
|
|
export const handle: SendouRouteHandle = {
|
|
i18n: ["vods"],
|
|
};
|
|
|
|
export const links: LinksFunction = () => {
|
|
return [{ rel: "stylesheet", href: styles }];
|
|
};
|
|
|
|
export default function UserVodsPage() {
|
|
const [, parentRoute] = useMatches();
|
|
invariant(parentRoute);
|
|
const userPageData = parentRoute.data as UserPageLoaderData;
|
|
|
|
return (
|
|
<div className="vods__listing__list">
|
|
{userPageData.vods.map((vod) => (
|
|
<VodListing key={vod.id} vod={vod} showUser={false} />
|
|
))}
|
|
</div>
|
|
);
|
|
}
|