Added actor creation page.

This commit is contained in:
2026-05-20 05:27:37 +02:00
parent 35ffc2b0f7
commit dc80e1e199
6 changed files with 220 additions and 64 deletions

View File

@@ -0,0 +1,20 @@
// export default '/actor/edit/@actorId/*';
// import { redirect } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { match } from 'path-to-regexp';
const path = '/actor/(edit|new)/:actorId?/:actorSlug?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
const matched = urlMatch(pageContext.urlPathname);
if (matched) {
return {
routeParams: matched.params.actorId ? {
actorId: matched.params.actorId,
} : {},
};
}
return false;
};