traxxx-web/pages/scene/+onBeforeRender.js

15 lines
283 B
JavaScript
Raw Normal View History

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,
},
},
};
}