11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
import { type LoaderFunctionArgs, redirect } from "@remix-run/node";
|
|
import { isMemberPlatinum } from "~/lib/middleware";
|
|
|
|
export async function loader({ request }: LoaderFunctionArgs) {
|
|
const isPlatinum = await isMemberPlatinum(request);
|
|
if (!isPlatinum) {
|
|
return redirect("/app");
|
|
}
|
|
return { isPlatinum };
|
|
}
|