trains: pokedex pages (builders, operators, countries, detail, random) and registrations
All checks were successful
Deploy production / deploy (push) Successful in 1m9s
All checks were successful
Deploy production / deploy (push) Successful in 1m9s
This commit is contained in:
20
src/routes/trackers/trains/makers/+page.server.ts
Normal file
20
src/routes/trackers/trains/makers/+page.server.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { trainOverview } from '#lib/server/trains.js';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async () => {
|
||||
const { byBuilt, stats } = await trainOverview();
|
||||
return {
|
||||
makers: byBuilt.map(({ slug, name, types, built, logo }) => ({
|
||||
slug,
|
||||
name,
|
||||
types,
|
||||
built,
|
||||
logo
|
||||
})),
|
||||
stats,
|
||||
seo: {
|
||||
title: 'Train builders',
|
||||
description: `All ${stats.makers} train builders in the train pokedex with their logos, most built first.`
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user