chore: application prettier

This commit is contained in:
Luc SORIGNET
2025-04-15 19:37:47 +02:00
parent dd0884bbce
commit f7666c894b
174 changed files with 10609 additions and 8760 deletions

View File

@ -1,4 +1,4 @@
import { NextResponse } from "next/server";
import { NextResponse } from 'next/server';
export function stackMiddlewares(functions = []) {
return async (request, event) => {
@ -17,4 +17,4 @@ export function stackMiddlewares(functions = []) {
return next(request, event);
};
}
}

View File

@ -9,7 +9,11 @@ const withLocale = (next) => {
const { pathname, search } = request.nextUrl;
// Ignorer les ressources statiques et API routes
if (pathname.startsWith('/_next') || pathname.startsWith('/api') || pathname.includes('.')) {
if (
pathname.startsWith('/_next') ||
pathname.startsWith('/api') ||
pathname.includes('.')
) {
return next(request, event);
}
@ -21,7 +25,9 @@ const withLocale = (next) => {
// Si pas de locale dans l'URL, rediriger vers /fr
if (!pathname.startsWith('/fr') && !pathname.startsWith('/en')) {
return NextResponse.redirect(new URL(`/fr${pathname}${search}`, request.url));
return NextResponse.redirect(
new URL(`/fr${pathname}${search}`, request.url)
);
}
// Appliquer le middleware next-intl
@ -39,4 +45,4 @@ const withLocale = (next) => {
};
};
export { withLocale };
export { withLocale };