20 lines
406 B
JavaScript
20 lines
406 B
JavaScript
import { fetchActors } from '#/src/actors.js';
|
|
|
|
export default async function onBeforeRender(pageContext) {
|
|
const { actors } = await fetchActors({
|
|
query: pageContext.urlParsed.search.q,
|
|
}, {
|
|
limit: 100,
|
|
// order: pageContext.urlParsed.search.order?.split('.') || ['likes', 'desc'],
|
|
}, pageContext.user);
|
|
|
|
return {
|
|
pageContext: {
|
|
title: 'Actors',
|
|
pageProps: {
|
|
actors,
|
|
},
|
|
},
|
|
};
|
|
}
|