| 1 | /** `/inbox` is Notifications now: the page, with the same query. */ |
| 2 | import { redirect } from "react-router"; |
| 3 | |
| 4 | import type { Route } from "./+types/inbox-moved"; |
| 5 | |
| 6 | export function loader({ request }: Route.LoaderArgs) { |
| 7 | const url = new URL(request.url); |
| 8 | url.searchParams.delete("_routes"); |
| 9 | const query = url.searchParams.toString(); |
| 10 | return redirect(`/notifications${query ? `?${query}` : ""}`, 301); |
| 11 | } |