Added movies overview page. Fixed channel filter duplicates.

This commit is contained in:
2024-02-27 01:20:15 +01:00
parent ae36a951a0
commit f29246050b
25 changed files with 993 additions and 48 deletions

21
pages/movies/+route.js Normal file
View File

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