import { fetchScenesById } from '#/src/scenes.js';

export async function onBeforeRender(pageContext) {
	const [scene] = await fetchScenesById([Number(pageContext.routeParams.sceneId)], {
		reqUser: pageContext.user,
		actorStashes: true,
	});

	return {
		pageContext: {
			title: scene.title,
			pageProps: {
				scene,
			},
		},
	};
}