ui phase 13

This commit is contained in:
hamid
2026-07-20 01:35:15 +03:30
parent d33568bf31
commit 12ce7fa7de
21 changed files with 868 additions and 80 deletions
+20
View File
@@ -0,0 +1,20 @@
import type { MetadataRoute } from 'next';
import { routing } from '@/i18n/routing';
import { ROUTES } from '@/constants';
import { SITE_URL } from '@/config';
/** Public, unauthenticated pages only (ui-phase-13) — mirrors `PUBLIC_PATHS` plus the locale root
* itself (the guest landing an unauthenticated `/` rewrites to). */
const PUBLIC_SITEMAP_PATHS: string[] = ['', ROUTES.LOGIN, ROUTES.TERMS, ROUTES.PRIVACY];
/** @route /sitemap.xml */
export default function sitemap(): MetadataRoute.Sitemap {
return PUBLIC_SITEMAP_PATHS.map((path) => ({
url: `${SITE_URL}/${routing.defaultLocale}${path}`,
alternates: {
languages: Object.fromEntries(
routing.locales.map((locale) => [locale, `${SITE_URL}/${locale}${path}`]),
),
},
}));
}