forked from MergeFi/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsitemap.ts
More file actions
24 lines (19 loc) · 795 Bytes
/
Copy pathsitemap.ts
File metadata and controls
24 lines (19 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import type { MetadataRoute } from "next";
import { mockBounties, mockReputationProfiles } from "@/lib/mock-data";
const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://mergefi.app";
export default function sitemap(): MetadataRoute.Sitemap {
const routes = ["", "/issues", "/milestones", "/connect"];
const staticEntries = routes.map((route) => ({
url: `${BASE_URL}${route}`,
lastModified: new Date(),
}));
const issueEntries = mockBounties.map((b) => ({
url: `${BASE_URL}/issues/${b.id}`,
lastModified: new Date(),
}));
const reputationEntries = Object.keys(mockReputationProfiles).map((handle) => ({
url: `${BASE_URL}/reputation/${handle}`,
lastModified: new Date(),
}));
return [...staticEntries, ...issueEntries, ...reputationEntries];
}