fix(lint): resolve eslint warnings, type errors and clean unused code

This commit is contained in:
mstfyldz
2026-08-23 01:51:51 +03:00
parent b312bc5593
commit 99951328ed
9 changed files with 31 additions and 81 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
import { i18n } from './app/dictionaries';
function getLocale(request: NextRequest): string {
function getLocale(): string {
// Always return default locale for now (can be improved to read headers)
return i18n.defaultLocale;
}
@@ -26,7 +26,7 @@ export function proxy(request: NextRequest) {
);
if (pathnameIsMissingLocale) {
const locale = getLocale(request);
const locale = getLocale();
return NextResponse.redirect(
new URL(`/${locale}${pathname === '/' ? '' : pathname}`, request.url)
);