20 lines
372 B
JavaScript
20 lines
372 B
JavaScript
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;
|
|
};
|