Skip to content

Commit

Permalink
feat: load more in quiz list
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Dec 17, 2024
1 parent 824484e commit bfc1d9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 6 additions & 4 deletions frontend/src/pages/Quizzes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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(() => {
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/utils/markdownParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
Expand Down

0 comments on commit bfc1d9a

Please sign in to comment.