elk/composables/status.ts

7 lines
287 B
TypeScript
Raw Normal View History

2023-01-08 06:21:09 +00:00
import type { mastodon } from 'masto'
2023-01-08 08:39:11 +00:00
export const navigateToStatus = ({ status, focusReply = false }: { status: mastodon.v1.Status; focusReply?: boolean }) => {
useNuxtApp().$rememberStatusPosition(status)
navigateTo({ path: getStatusRoute(status).href, state: { focusReply } })
}