wip: mentor dropdown
This commit is contained in:
parent
09b2586262
commit
ab494a1c67
|
|
@ -0,0 +1,23 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
|
const mentors = ref([]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const response = await fetch("/api/mentor/mentors");
|
||||||
|
if (response.ok) {
|
||||||
|
mentors.value = await response.json();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<code>{{ mentors }} Hello</code>
|
||||||
|
<select>
|
||||||
|
<option v-for="mentor in mentors" :key="mentor.id" :value="mentor.id">
|
||||||
|
{{ mentor.first_name }} {{ mentor.last_name }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Loading…
Reference in New Issue