Rocky_Mountain_Vending/.pnpm-store/v10/files/ed/c5da81193db4dfd7294a2a94a3cb05a0adf7affe3701887de631c87eda93e73d3724c85f436960077b1e5c39c556320882c6e9894d3b1c55de7787174c6c13
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

18 lines
No EOL
722 B
Text

import { isAbsoluteUrl, getLocationOrigin } from '../../utils';
import { hasBasePath } from '../../../../client/has-base-path';
/**
* Detects whether a given url is routable by the Next.js router (browser only).
*/ export function isLocalURL(url) {
// prevent a hydration mismatch on href for url with anchor refs
if (!isAbsoluteUrl(url)) return true;
try {
// absolute urls can be local if they are on the same origin
const locationOrigin = getLocationOrigin();
const resolved = new URL(url, locationOrigin);
return resolved.origin === locationOrigin && hasBasePath(resolved.pathname);
} catch (_) {
return false;
}
}
//# sourceMappingURL=is-local-url.js.map