19 lines
388 B
JavaScript
19 lines
388 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' }, {
|
|
restriction: pageContext.restriction,
|
|
});
|
|
|
|
return {
|
|
pageContext: {
|
|
title: 'Channels',
|
|
pageProps: {
|
|
networks,
|
|
},
|
|
},
|
|
};
|
|
}
|