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