blob: 902c74e7ab63543cb50a892da0f44520225a883a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { data, redirect } from "react-router";
import type { LoaderFunctionArgs } from "react-router";
import { getBandListBySlug } from "~/lib/db.server";
export async function loader({ params }: LoaderFunctionArgs) {
const list = getBandListBySlug(params.slug!);
if (!list) throw data("Not found", { status: 404 });
return redirect(`/lists/of/${list.id}`);
}
export default function ListBySlug() {
return null;
}
|