Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
No EOL
481 B
Text
15 lines
No EOL
481 B
Text
import { pathHasPrefix } from '../router/utils/path-has-prefix';
|
|
/**
|
|
* strip _next/data/<build-id>/ prefix and .json suffix
|
|
*/ export function normalizeDataPath(pathname) {
|
|
if (!pathHasPrefix(pathname || '/', '/_next/data')) {
|
|
return pathname;
|
|
}
|
|
pathname = pathname.replace(/\/_next\/data\/[^/]{1,}/, '').replace(/\.json$/, '');
|
|
if (pathname === '/index') {
|
|
return '/';
|
|
}
|
|
return pathname;
|
|
}
|
|
|
|
//# sourceMappingURL=normalize-data-path.js.map |