Fixed pagination. Added entity page channel tile expand.

This commit is contained in:
2024-01-25 03:07:26 +01:00
parent 0b3f98826b
commit d739975d36
29 changed files with 1056 additions and 128 deletions

View File

@@ -0,0 +1,23 @@
import { match } from 'path-to-regexp';
// import { resolveRoute } from 'vike/routing'; // eslint-disable-line import/extensions
const path = '/:entityType(channel|network)/:entitySlug/:scope?/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
const matched = urlMatch(pageContext.urlPathname);
if (matched) {
return {
routeParams: {
entityType: matched.params.entityType,
entitySlug: matched.params.entitySlug,
scope: matched.params.scope || 'latest',
page: matched.params.page || '1',
path,
},
};
}
return false;
};