2024-10-22 23:28:54 +00:00
|
|
|
import { match } from 'path-to-regexp';
|
|
|
|
|
|
|
|
const path = '/scene/revs/:sceneId/:slug?';
|
|
|
|
const urlMatch = match(path, { decode: decodeURIComponent });
|
|
|
|
|
|
|
|
export default (pageContext) => {
|
|
|
|
const matched = urlMatch(pageContext.urlPathname);
|
|
|
|
|
|
|
|
if (matched) {
|
|
|
|
return {
|
|
|
|
routeParams: {
|
|
|
|
sceneId: matched.params.sceneId,
|
|
|
|
domain: 'scenes',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
};
|