17 lines
342 B
JavaScript
17 lines
342 B
JavaScript
import { fetchEntities } from '#/src/entities.js';
|
|
|
|
export async function onBeforeRender(pageContext) {
|
|
const networks = await fetchEntities(pageContext.urlParsed.search.q
|
|
? { query: pageContext.urlParsed.search.q }
|
|
: { type: 'primary' });
|
|
|
|
return {
|
|
pageContext: {
|
|
title: 'Channels',
|
|
pageProps: {
|
|
networks,
|
|
},
|
|
},
|
|
};
|
|
}
|