fix payment customer and dashboard settings
Build & Deploy / Build & Push Docker Image (push) Successful in 12m39s
Test / Type Check (all packages) (push) Successful in 5m8s
Build & Deploy / Deploy to VPS (push) Successful in 7s
Test / API Unit Tests (push) Failing after 4m24s
Test / Homepage Unit Tests (push) Successful in 3m27s
Test / Storefront Unit Tests (push) Successful in 4m48s
Test / Admin Unit Tests (push) Successful in 3m0s
Test / Dashboard Unit Tests (push) Successful in 4m18s
Test / API Integration Tests (push) Failing after 4m34s

This commit is contained in:
root
2026-06-29 22:15:34 -04:00
parent e1e2f55c93
commit a752a399c2
30 changed files with 4503 additions and 1214 deletions
@@ -116,6 +116,20 @@ export function routeIdFromSlug(locale: Locale, slug: string): RouteId | null {
return route?.id ?? null;
}
export function routeIdFromAnyLocaleSlug(slug: string): RouteId | null {
let decoded: string;
try {
decoded = decodeURIComponent(slug);
} catch {
return null;
}
const normalized = decoded.replace(/^\/+|\/+$/g, '');
const route = routeManifest.routes.find((item) =>
locales.some((locale) => item.slugs[locale] === normalized),
);
return route?.id ?? null;
}
export function routeIdFromPathname(pathname: string): RouteId | null {
const [localeValue, ...segments] = pathname.split('/').filter(Boolean);
if (!isLocale(localeValue)) return null;