Commit af29c573 by Arjun Jhukal

minor changes

parent 777f9ded
......@@ -7,13 +7,11 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const frontendUrl = process.env.NEXT_PUBLIC_FRONTEND_URL!;
const apiUrl = process.env.NEXT_PUBLIC_BASE_URL!;
// ✅ Fetch Menus
const menuRes = await fetch(`${apiUrl}/api/general/menus`, {
next: { revalidate: 48600 },
});
const menuData = await menuRes.json();
// ✅ Fetch Games
const gameRes = await getAllGames();
const gameData = gameRes?.data?.data || [];
......@@ -21,17 +19,12 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
{
url: frontendUrl,
priority: 1
// lastModified: new Date(),
// changeFrequency: "monthly",
},
];
// ✅ Append /general/[slug]
if (menuData?.data?.length) {
const menuUrls: MetadataRoute.Sitemap = menuData.data.map((menu: any) => ({
url: `${frontendUrl}/general/${menu.slug}`,
// lastModified: new Date(),
// changeFrequency: "weekly",
priority: 0.9
}));
......@@ -42,8 +35,6 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
if (gameData.length) {
const gameUrls: MetadataRoute.Sitemap = gameData.map((game: any) => ({
url: `${frontendUrl}/exclusive-games/${game.id}`,
// lastModified: new Date(),
// changeFrequency: "weekly",
priority: 0.9
}));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment