Rocky_Mountain_Vending/.pnpm-store/v10/files/db/87a707a744567d32209d7b7c39a4e22b2aab7e85bf142696731df7f26f53082737230d7bb60a71aa279392f41480f72271a53ac2238001c0cb019de89760ba
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

30 lines
No EOL
937 B
Text

function resolveTitleTemplate(template, title) {
return template ? template.replace(/%s/g, title) : title;
}
export function resolveTitle(title, stashedTemplate) {
let resolved;
const template = typeof title !== 'string' && title && 'template' in title ? title.template : null;
if (typeof title === 'string') {
resolved = resolveTitleTemplate(stashedTemplate, title);
} else if (title) {
if ('default' in title) {
resolved = resolveTitleTemplate(stashedTemplate, title.default);
}
if ('absolute' in title && title.absolute) {
resolved = title.absolute;
}
}
if (title && typeof title !== 'string') {
return {
template,
absolute: resolved || ''
};
} else {
return {
absolute: resolved || title || '',
template
};
}
}
//# sourceMappingURL=resolve-title.js.map