mirror of
https://codeberg.org/SafeTwitch/safetwitch.git
synced 2024-12-22 05:12:57 -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) {
|
||||
const cursor = this.data[this.data.length - 1].cursor
|
||||
if (!cursor) return
|
||||
const res = await fetch(
|
||||
`${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()
|
||||
const res = await getEndpoint('api/discover?cursor=' + cursor)
|
||||
|
||||
for (let category of resData.data) {
|
||||
for (let category of res) {
|
||||
this.data.push(category)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue