fix: buildLocalePath always includes locale prefix - required by routing
This commit is contained in:
@@ -32,8 +32,6 @@ export function getPathWithoutLocale(pathname: string): string {
|
||||
}
|
||||
|
||||
export function buildLocalePath(locale: Locale, path: string): string {
|
||||
if (locale === DEFAULT_LOCALE) {
|
||||
return path === "/" ? "/" : path;
|
||||
}
|
||||
return `/${locale}${path === "/" ? "" : path}`;
|
||||
const pathPart = path === "/" ? "" : path;
|
||||
return `/${locale}${pathPart}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user