refactor: getAccountHandle, getAccountPath, getStatusPath

This commit is contained in:
patak 2022-11-23 23:40:35 +01:00
parent 713617e19a
commit f596973603
8 changed files with 26 additions and 14 deletions

View file

@ -26,7 +26,7 @@ function go(e: MouseEvent) {
const path = e.composedPath() as HTMLElement[]
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
if (!el)
router.push(`/@${status.account.acct}/${status.id}`)
router.push(getStatusPath(status))
}
const timeago = useTimeAgo(() => status.createdAt, {