mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2024-12-22 13:22:58 -05:00
Fix Infinite scroll being in english
This commit is contained in:
parent
5cddb95ce8
commit
17e8ab6793
1 changed files with 2 additions and 10 deletions
|
@ -56,17 +56,9 @@ export default {
|
||||||
if (bottomOfWindow && this.data) {
|
if (bottomOfWindow && this.data) {
|
||||||
const cursor = this.data[this.data.length - 1].cursor
|
const cursor = this.data[this.data.length - 1].cursor
|
||||||
if (!cursor) return
|
if (!cursor) return
|
||||||
const res = await fetch(
|
const res = await getEndpoint('api/discover?cursor=' + cursor)
|
||||||
`${this.protocol}${
|
|
||||||
import.meta.env.SAFETWITCH_BACKEND_DOMAIN
|
|
||||||
}/api/discover?cursor=${cursor}`
|
|
||||||
)
|
|
||||||
if (!res.ok) {
|
|
||||||
throw new Error('Failed to fetch data')
|
|
||||||
}
|
|
||||||
const resData = await res.json()
|
|
||||||
|
|
||||||
for (let category of resData.data) {
|
for (let category of res) {
|
||||||
this.data.push(category)
|
this.data.push(category)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue