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 {
|
export function buildLocalePath(locale: Locale, path: string): string {
|
||||||
if (locale === DEFAULT_LOCALE) {
|
const pathPart = path === "/" ? "" : path;
|
||||||
return path === "/" ? "/" : path;
|
return `/${locale}${pathPart}`;
|
||||||
}
|
|
||||||
return `/${locale}${path === "/" ? "" : path}`;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user