feat: resolve status paths with router (#258)
This commit is contained in:
parent
24bbe9135b
commit
4ed1816806
22 changed files with 106 additions and 50 deletions
|
@ -2,12 +2,16 @@
|
|||
import type { Status } from 'masto'
|
||||
import type { ComponentPublicInstance } from 'vue'
|
||||
|
||||
definePageMeta({
|
||||
name: 'status',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const id = $(computedEager(() => route.params.status as string))
|
||||
const main = ref<ComponentPublicInstance | null>(null)
|
||||
let bottomSpace = $ref(0)
|
||||
|
||||
const { data: status, pending, refresh: refreshStatus } = useAsyncData(async () => (
|
||||
const { data: status, pending, refresh: refreshStatus } = useAsyncData(`status:${id}`, async () => (
|
||||
window.history.state?.status as Status | undefined)
|
||||
?? await fetchStatus(id),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue