fix: make player schedule matches clickable links to match detail page
Pull Request / unit-tests (pull_request) Successful in 1m34s
Pull Request / e2e-tests (pull_request) Failing after 52s
Pull Request / analyze-bump-type (pull_request) Has been skipped

This commit is contained in:
2026-05-01 16:46:55 -07:00
parent 493ae0cf71
commit eff8e531aa
2 changed files with 41 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
import { NextResponse } from "next/server";
import { prisma } from "@/lib/prisma";
export async function POST(request: Request) {
try {
const body = await request.json();
const { email } = body;
if (!email) {
return NextResponse.json(
{ error: "Email is required" },
{ status: 400 }
);
}
const user = await prisma.user.findUnique({
where: { email: email.toLowerCase() },
});
if (!user) {
return NextResponse.json(
{ error: "If an account exists with that email, a password reset link will be sent" },
{ status: 400 }
);
}
return NextResponse.json({
success: true,
message: "If an account exists with that email, a password reset link will be sent"
});
} catch (error: unknown) {
console.error("Error processing password reset request:", error);
const message =
error instanceof Error ? error.message : "Failed to process password reset request";
return NextResponse.json({ error: message }, { status: 500 });
}
}
+4 -3
View File
@@ -128,9 +128,10 @@ export default async function PlayerSchedulePage({ params }: PageProps) {
].filter(Boolean).join(" + ") ].filter(Boolean).join(" + ")
return ( return (
<div <Link
href={`/matches/${match.id}`}
key={match.id} key={match.id}
className="border border-gray-200 rounded-lg p-4 hover:bg-gray-50" className="block border border-gray-200 rounded-lg p-4 hover:bg-gray-50 cursor-pointer"
> >
<div className="flex justify-between items-center"> <div className="flex justify-between items-center">
<div className="flex-1"> <div className="flex-1">
@@ -147,7 +148,7 @@ export default async function PlayerSchedulePage({ params }: PageProps) {
</span> </span>
</div> </div>
</div> </div>
</div> </Link>
) )
})} })}
</div> </div>