| 1 | /** |
| 2 | * An agent's old People address, `-/people/agents/:handle`. People lists |
| 3 | * people only; an agent's profile is its page in Agents, so links to the |
| 4 | * old address are sent there for good (lib/people.ts `agentPath`). |
| 5 | */ |
| 6 | import { redirect } from "react-router"; |
| 7 | |
| 8 | import type { Route } from "./+types/agent"; |
| 9 | import { agentPath } from "../../../lib/people"; |
| 10 | |
| 11 | export function loader({ params }: Route.LoaderArgs) { |
| 12 | return redirect(agentPath(params.owner.toLowerCase(), params.handle.toLowerCase()), 301); |
| 13 | } |