2025-10-11 00:53:39 -07:00
|
|
|
import { UserProfile } from "@clerk/react-router";
|
|
|
|
|
import { getAuth } from "@clerk/react-router/server";
|
|
|
|
|
import { redirect } from "react-router";
|
|
|
|
|
import type { Route } from "./+types/user-profile";
|
|
|
|
|
|
2026-03-10 12:10:52 -07:00
|
|
|
export function meta(): Route.MetaDescriptors {
|
|
|
|
|
return [{ title: "Profile - Brackt" }];
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-11 00:53:39 -07:00
|
|
|
export async function loader(args: Route.LoaderArgs) {
|
|
|
|
|
const { userId } = await getAuth(args);
|
|
|
|
|
|
|
|
|
|
if (!userId) {
|
|
|
|
|
return redirect("/");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function UserProfilePage() {
|
|
|
|
|
return (
|
|
|
|
|
<div className="container mx-auto py-8 px-4 flex justify-center">
|
|
|
|
|
<UserProfile />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|