Replaced profile pill bar with portal page.

This commit is contained in:
2026-07-18 03:20:50 +02:00
parent 981205efaa
commit 7c6bde690f
9 changed files with 304 additions and 114 deletions

View File

@@ -6,16 +6,17 @@ const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {
const matched = urlMatch(pageContext.urlPathname);
const isSelf = pageContext.user?.username === matched.params?.username;
if (matched) {
if (![undefined, 'stashes'].includes(matched.params.domain) && pageContext.user?.username !== matched.params.username) {
throw redirect(`/user/${matched.params.username}`);
if (!isSelf && matched.params.section !== 'stashes') {
throw redirect(`/user/${matched.params.username}/stashes`);
}
return {
routeParams: {
username: matched.params.username,
section: matched.params.section || 'stashes',
section: matched.params.section || '',
domain: matched.params.domain || 'scenes',
},
};