Rename eventSlug prop

This commit is contained in:
philipp lang 2024-02-03 22:25:35 +01:00
parent 64caad9aef
commit c55bb174c2
1 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ const props = defineProps({
required: true, required: true,
type: String, type: String,
}, },
event: { visibleEventSlug: {
required: false, required: false,
type: String, type: String,
}, },
@ -58,8 +58,8 @@ const visibleEvent = ref(null);
async function reloadEvents() { async function reloadEvents() {
const results = await axios.get('/api/form'); const results = await axios.get('/api/form');
events.value = results.data.data; events.value = results.data.data;
if (props.event) { if (props.visibleEventSlug) {
visibleEvent.value = events.value.find((event) => event.slug === props.event); visibleEvent.value = events.value.find((event) => event.slug === props.visibleEventSlug);
} }
} }