fix(front): correct display artist widget
This commit is contained in:
parent
ff32ff7bac
commit
e18b193cec
|
@ -51,7 +51,7 @@ const fetchData = async (url = 'artists/') => {
|
|||
const response = await axios.get(url, { params })
|
||||
nextPage.value = response.data.next
|
||||
count.value = response.data.count
|
||||
artists.push(...response.data.results)
|
||||
artists.splice(0, artists.length, ...response.data.results)
|
||||
} catch (error) {
|
||||
useErrorHandler(error as Error)
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ watch(
|
|||
name="empty-state"
|
||||
>
|
||||
<empty-state
|
||||
style="grid-column: 1 / -1;"
|
||||
:refresh="true"
|
||||
@refresh="fetchData"
|
||||
/>
|
||||
|
@ -107,6 +108,7 @@ watch(
|
|||
<Pagination
|
||||
v-if="artists && count > limit"
|
||||
v-model:page="page"
|
||||
style="grid-column: 1 / -1;"
|
||||
:pages="Math.ceil((count || 0) / limit)"
|
||||
/>
|
||||
</Section>
|
||||
|
|
Loading…
Reference in New Issue