Added actors pagination.

This commit is contained in:
2024-01-04 01:49:16 +01:00
parent 424546029d
commit aad43e865a
17 changed files with 284 additions and 105 deletions
+20
View File
@@ -0,0 +1,20 @@
import { match } from 'path-to-regexp';
// import { resolveRoute } from 'vike/routing'; // eslint-disable-line import/extensions
const path = '/actors/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
const matched = urlMatch(pageContext.urlPathname);
if (matched) {
return {
routeParams: {
page: matched.params.page || '1',
path,
},
};
}
return false;
};