2024-01-25 02:07:26 +00:00
|
|
|
import { fetchEntities } from '#/src/entities.js';
|
|
|
|
|
2024-05-19 03:07:35 +00:00
|
|
|
export async function onBeforeRender(pageContext) {
|
|
|
|
const networks = await fetchEntities(pageContext.urlParsed.search.q
|
|
|
|
? { query: pageContext.urlParsed.search.q }
|
|
|
|
: { type: 'primary' });
|
2024-01-25 02:07:26 +00:00
|
|
|
|
|
|
|
return {
|
|
|
|
pageContext: {
|
|
|
|
title: 'Channels',
|
|
|
|
pageProps: {
|
|
|
|
networks,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|