Redirects the legacy /inbox route to /inboxes/messages and keeps an optional email query parameter. Reuse it when old inbox links must keep working after the screen moved.
// Source: https://github.com/Anil-matcha/open-agent-email | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { Suspense } from "react";
import { redirect } from "next/navigation";
type Search = Promise<{ email?: string }>;
async function Redirect({ searchParams }: { searchParams: Search }): Promise<never> {
const { email } = await searchParams;
redirect(email ? `/inboxes/messages?email=${encodeURIComponent(email)}` : "/inboxes/messages");
}
// This screen now lives in the per-inbox view under /inboxes.
export default function Page({ searchParams }: { searchParams: Search }) {
return (
<Suspense fallback={null}>
<Redirect searchParams={searchParams} />
<
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key