chore: use reactive props

This commit is contained in:
Daniel Chen
2024-10-16 13:25:13 -04:00
parent 5fd2150beb
commit 6bf5d77a01
8 changed files with 41 additions and 43 deletions

View File

@@ -1,9 +1,6 @@
<script setup lang="ts">
const props = withDefaults(defineProps<{ src: string; alt?: string }>(), {
alt: "",
});
const { src, alt = "" } = defineProps<{ src: string; alt?: string }>();
const src = props.src;
const imgSrc =
src.startsWith("http://") || src.startsWith("https://")
? src