cleanup and start work on player page

This commit is contained in:
Lee
2024-09-09 09:24:16 +01:00
parent 527d18a422
commit b7ec3ebe0e
8 changed files with 195 additions and 140 deletions

View File

@ -8,7 +8,7 @@ export function middleware(request: NextRequest) {
const playerIdCookie = cookies.get("playerId");
if (pathname == "/") {
if (playerIdCookie) {
return NextResponse.redirect(new URL(`/player/${playerIdCookie.value}/top/1`, request.url));
return NextResponse.redirect(new URL(`/player/${playerIdCookie.value}`, request.url));
} else {
return NextResponse.redirect(new URL("/search", request.url));
}