Add homepage and make bridges look nice
This commit is contained in:
17
src/routes/+page.ts
Normal file
17
src/routes/+page.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const response = await fetch('map-index.json');
|
||||
|
||||
if (!response.ok) {
|
||||
return { maps: [] };
|
||||
}
|
||||
|
||||
const maps = await response.json();
|
||||
|
||||
return {
|
||||
maps: maps.sort((a: any, b: any) => {
|
||||
return Number(a.routeId) - Number(b.routeId);
|
||||
})
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user