unify page
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div v-if="data">
|
||||
<MainPoll :question-component="QuestionResult" :results="data" />
|
||||
</div>
|
||||
<div v-else>
|
||||
Couldn't fetch poll results ! Please contact the website administrator
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import QuestionResult from '~/components/QuestionResult.vue';
|
||||
|
||||
const { data, error } = await useFetch<{ [question_id: string]: { [values: string]: number } }>('http://localhost:3000/results/beautifulAccessCode', {
|
||||
})
|
||||
|
||||
if (error) {
|
||||
console.log(error.value)
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user