refactor: replace withDefaults with Vue 3.5 props destructuring (#9150)

## Summary
- Replace all `withDefaults(defineProps<...>())` with Vue 3.5 reactive
props destructuring across 14 components
- Update `props.xxx` references to use destructured variables directly
in script and template

- Fixes #2334

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9150-refactor-replace-withDefaults-with-Vue-3-5-props-destructuring-3116d73d365081e7a721db3369600671)
by [Unito](https://www.unito.io)
This commit is contained in:
Johnpaul Chiwetelu
2026-02-24 05:30:44 +01:00
committed by GitHub
parent be70f6c1e6
commit 724827d8cc
14 changed files with 170 additions and 213 deletions

View File

@@ -161,15 +161,10 @@ import { formatTime } from '../../utils/audioUtils'
const { t } = useI18n()
const toast = useToast()
const props = withDefaults(
defineProps<{
hideWhenEmpty?: boolean
showOptionsButton?: boolean
}>(),
{
hideWhenEmpty: true
}
)
const { hideWhenEmpty = true, showOptionsButton } = defineProps<{
hideWhenEmpty?: boolean
showOptionsButton?: boolean
}>()
// Refs
const audioRef = useTemplateRef('audioRef')