mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-11 17:40:05 -04:00
Update +page.svelte
This commit is contained in:
parent
5c089d8b5c
commit
83fae6259f
1 changed files with 1 additions and 12 deletions
|
@ -10,12 +10,11 @@
|
||||||
countries,
|
countries,
|
||||||
filteredChannels,
|
filteredChannels,
|
||||||
query,
|
query,
|
||||||
setSearchParam,
|
|
||||||
setPageTitle,
|
setPageTitle,
|
||||||
downloadMode,
|
downloadMode,
|
||||||
search
|
search
|
||||||
} from '~/store'
|
} from '~/store'
|
||||||
import { onMount, onDestroy } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import CountryItem from '~/components/CountryItem.svelte'
|
import CountryItem from '~/components/CountryItem.svelte'
|
||||||
import SearchField from '~/components/SearchField.svelte'
|
import SearchField from '~/components/SearchField.svelte'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
@ -26,16 +25,6 @@
|
||||||
|
|
||||||
$: groupedByCountry = _.groupBy($filteredChannels, 'country')
|
$: groupedByCountry = _.groupBy($filteredChannels, 'country')
|
||||||
|
|
||||||
function loadMore({ detail }) {
|
|
||||||
let { loaded, complete } = detail
|
|
||||||
if (limit < _countries.length) {
|
|
||||||
limit++
|
|
||||||
loaded()
|
|
||||||
} else {
|
|
||||||
complete()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (!$channels.length) {
|
if (!$channels.length) {
|
||||||
await fetchChannels()
|
await fetchChannels()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue