040e1df685
- Major UI updates across dashboard, analytics, posts, trades, settings - New landing page, robots/sitemap, contact/privacy/terms pages - Updated globals.css with extensive styling and new landing.css - Refactor signedRequest, realtime data hook, and dashboard store Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
701 B
TypeScript
20 lines
701 B
TypeScript
import type { MetadataRoute } from 'next'
|
|
|
|
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL
|
|
if (!siteUrl && process.env.NODE_ENV === 'production') {
|
|
throw new Error('NEXT_PUBLIC_SITE_URL must be set in production builds (used by sitemap.xml)')
|
|
}
|
|
const baseUrl = (siteUrl || 'http://localhost:3001').replace(/\/$/, '')
|
|
const routes = ['', '/posts', '/trades', '/analytics', '/settings', '/privacy', '/terms', '/contact']
|
|
|
|
export default function sitemap(): MetadataRoute.Sitemap {
|
|
const now = new Date()
|
|
|
|
return routes.map((route) => ({
|
|
url: `${baseUrl}/en${route}`,
|
|
lastModified: now,
|
|
changeFrequency: route === '' ? 'hourly' : 'daily',
|
|
priority: route === '' ? 1 : 0.7,
|
|
}))
|
|
}
|