traxxx-web/pages/admin/revisions/scenes/+route.js

20 lines
389 B
JavaScript
Raw Normal View History

2024-10-22 01:12:42 +00:00
import { match } from 'path-to-regexp';
const path = '/admin/:section/:domain(scenes)';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
const matched = urlMatch(pageContext.urlPathname);
if (matched) {
return {
routeParams: {
section: matched.params.section,
domain: matched.params.domain,
},
};
}
return false;
};