refactor: remove withDefaults
macro and clean up reactive props destructuring (#3217)
This commit is contained in:
parent
7d9712c209
commit
60b1d0224c
52 changed files with 177 additions and 232 deletions
|
@ -1,14 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
const props = defineProps<{
|
||||
const { status } = defineProps<{
|
||||
status: mastodon.v1.Status
|
||||
hover?: boolean
|
||||
}>()
|
||||
|
||||
const el = ref<HTMLElement>()
|
||||
const router = useRouter()
|
||||
const statusRoute = computed(() => getStatusRoute(props.status))
|
||||
const statusRoute = computed(() => getStatusRoute(status))
|
||||
|
||||
function onclick(evt: MouseEvent | KeyboardEvent) {
|
||||
const path = evt.composedPath() as HTMLElement[]
|
||||
|
@ -24,7 +24,7 @@ function go(evt: MouseEvent | KeyboardEvent) {
|
|||
window.open(statusRoute.value.href)
|
||||
}
|
||||
else {
|
||||
cacheStatus(props.status)
|
||||
cacheStatus(status)
|
||||
router.push(statusRoute.value)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue