mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 07:34:09 +02:00
enhance(frontend): typed nirax (#16309)
* enhance(frontend): typed nirax * migrate router.replace * fix
This commit is contained in:
@@ -158,7 +158,11 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
|
||||
icon: 'ti ti-user-exclamation',
|
||||
text: i18n.ts.moderation,
|
||||
action: () => {
|
||||
router.push(`/admin/user/${user.id}`);
|
||||
router.push('/admin/user/:userId', {
|
||||
params: {
|
||||
userId: user.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
}, { type: 'divider' });
|
||||
}
|
||||
@@ -216,7 +220,12 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
|
||||
icon: 'ti ti-search',
|
||||
text: i18n.ts.searchThisUsersNotes,
|
||||
action: () => {
|
||||
router.push(`/search?username=${encodeURIComponent(user.username)}${user.host != null ? '&host=' + encodeURIComponent(user.host) : ''}`);
|
||||
router.push('/search', {
|
||||
query: {
|
||||
username: user.username,
|
||||
host: user.host ?? undefined,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user