const ERRORS: Record = { OAuthAccountNotLinked: { title: "Account already exists", messages: [ "An account with this email already exists, but it was created using a different login method.", "Please sign in with the provider you originally used (Google, GitHub, or Discord).", ], }, Configuration: { title: "Server error", messages: ["There is a problem with the server configuration. Please e-mail hello@trafficlunar.net or message @trafficlunar on Discord"], }, }; const FALLBACK = { title: "Sign in failed", messages: ["Something went wrong while signing in. Please try again."], }; export default function AccountErrorPage() { const code = new URLSearchParams(window.location.search).get("error") ?? ""; const { title, messages } = ERRORS[code] ?? FALLBACK; return (

{title}

{messages.map((message) => (

{message}

))} Back to home
); }