All checks were successful
Deploy production / deploy (push) Successful in 1m9s
21 lines
500 B
TypeScript
21 lines
500 B
TypeScript
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.`
|
|
}
|
|
};
|
|
};
|