feat: load more in quiz list

This commit is contained in:
Jannat Patel
2024-12-17 17:48:49 +05:30
parent 824484e608
commit bfc1d9a0a8
2 changed files with 6 additions and 6 deletions

View File

@@ -46,6 +46,11 @@
</router-link>
</ListRows>
</ListView>
<div class="flex justify-center my-5">
<Button v-if="quizzes.hasNextPage" @click="quizzes.next()">
{{ __('Load More') }}
</Button>
</div>
</div>
<div
v-else
@@ -67,13 +72,13 @@
<script setup>
import {
Breadcrumbs,
Button,
createListResource,
ListView,
ListRows,
ListRow,
ListHeader,
ListHeaderItem,
Button,
} from 'frappe-ui'
import { useRouter } from 'vue-router'
import { computed, inject, onMounted } from 'vue'
@@ -103,9 +108,6 @@ const quizzes = createListResource({
auto: true,
cache: ['quizzes', user.data?.name],
orderBy: 'modified desc',
onSuccess(data) {
data.forEach((row) => {})
},
})
const quizColumns = computed(() => {

View File

@@ -65,8 +65,6 @@ export class Markdown {
} else if (previousLine && this.hasLink(previousLine)) {
const { text, url } = this.extractLink(previousLine)
const anchorTag = `<a href="${url}" target="_blank">${text}</a>`
console.log(previousLine.replace(/\[.+?\]\(.+?\)/, anchorTag))
debugger
this.convertBlock('paragraph', {
text: previousLine.replace(/\[.+?\]\(.+?\)/, anchorTag),
})