traxxx-web/pages/entities/+onBeforeRender.js

15 lines
262 B
JavaScript

import { fetchEntities } from '#/src/entities.js';
export async function onBeforeRender(_pageContext) {
const networks = await fetchEntities({ type: 'primary' });
return {
pageContext: {
title: 'Channels',
pageProps: {
networks,
},
},
};
}