This commit is contained in:
HAM!DREZA
2024-12-31 11:52:10 +03:30
parent 6c388b6e07
commit 01c8e31ee1
27 changed files with 331 additions and 396 deletions
+3 -3
View File
@@ -217,7 +217,7 @@
<Loading v-if="pending"/>
<Loading v-if="pending"/>
<Loading v-if="pending"/>
<div v-else v-for="(course, index) in data.courses" :key="index">
<div v-else v-for="(course, index) in data?.courses" :key="index">
<Card :course="course" />
</div>
@@ -437,7 +437,7 @@ const { data, refresh, pending } = await useFetch(() => "/api/course", {
paginationLength.value = Math.ceil(data.value.count / 2);
paginationLength.value = Math.ceil(data?.value?.count / 2);
function changePage(page) {
pageNumber.value = page;
query.value = { ...route.query, page: pageNumber };
@@ -591,7 +591,7 @@ const searchHandler = () =>{
refresh();
}
watch(data , () => {
paginationLength.value = Math.ceil(data.value.count / 2);
paginationLength.value = Math.ceil(data?.value?.count / 2);
})