Rename eventSlug prop
This commit is contained in:
parent
64caad9aef
commit
c55bb174c2
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue