Rocky_Mountain_Vending/.pnpm-store/v10/files/80/5df981f1184ef26521207b9f7144a5383cade964a8680047ac07792c611f12ce3de1b35f0f6210d09263ee61d924cd2e34c8611ec00ddfe12d4f968d2723bc
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

15 lines
No EOL
603 B
Text

export function detectDomainLocale(domainItems, hostname, detectedLocale) {
if (!domainItems) return;
if (detectedLocale) {
detectedLocale = detectedLocale.toLowerCase();
}
for (const item of domainItems){
// remove port if present
const domainHostname = item.domain?.split(':', 1)[0].toLowerCase();
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale)=>locale.toLowerCase() === detectedLocale)) {
return item;
}
}
}
//# sourceMappingURL=detect-domain-locale.js.map