Merge remote-tracking branch 'origin/master'
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m31s
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m31s
This commit is contained in:
commit
577fcb0e0d
@ -221,7 +221,7 @@ export default function PlayerScores({ initialScoreData, initialSearch, player,
|
|||||||
className="grid min-w-full grid-cols-1 divide-y divide-border"
|
className="grid min-w-full grid-cols-1 divide-y divide-border"
|
||||||
>
|
>
|
||||||
{scores.scores.map((score, index) => (
|
{scores.scores.map((score, index) => (
|
||||||
<motion.div key={score.score.id} variants={scoreAnimation}>
|
<motion.div key={index} variants={scoreAnimation}>
|
||||||
<Score score={score.score} leaderboard={score.leaderboard} beatSaverMap={score.beatSaver} />
|
<Score score={score.score} leaderboard={score.leaderboard} beatSaverMap={score.beatSaver} />
|
||||||
</motion.div>
|
</motion.div>
|
||||||
))}
|
))}
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
import { type NextRequest, NextResponse } from "next/server";
|
|
||||||
import { isProduction } from "@ssr/common/utils/utils";
|
|
||||||
|
|
||||||
export function middleware(request: NextRequest) {
|
|
||||||
const before = Date.now();
|
|
||||||
const response = NextResponse.next();
|
|
||||||
const ip = request.headers.get("CF-Connecting-IP") || request.headers.get("X-Forwarded-For");
|
|
||||||
|
|
||||||
// Log requests in production
|
|
||||||
if (isProduction()) {
|
|
||||||
console.log(
|
|
||||||
` ${ip} | ${request.method} ${request.nextUrl.pathname} ${response.status} in ${(Date.now() - before).toFixed(0)}ms`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const config = {
|
|
||||||
matcher: [
|
|
||||||
/*
|
|
||||||
* Match all request paths except for the ones starting with:
|
|
||||||
* - api (API routes)
|
|
||||||
* - _next/static (static files)
|
|
||||||
* - _next/image (image optimization files)
|
|
||||||
* - favicon.ico (favicon file)
|
|
||||||
*/
|
|
||||||
"/((?!api|_next/static|_next/image|favicon.ico).*)",
|
|
||||||
],
|
|
||||||
};
|
|
Reference in New Issue
Block a user