15 lines
283 B
JavaScript
15 lines
283 B
JavaScript
|
import { fetchScenesById } from '../../src/scenes';
|
||
|
|
||
|
export async function onBeforeRender(pageContext) {
|
||
|
const [scene] = await fetchScenesById([Number(pageContext.routeParams.sceneId)]);
|
||
|
|
||
|
return {
|
||
|
pageContext: {
|
||
|
title: scene.title,
|
||
|
pageProps: {
|
||
|
scene,
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
}
|