Update +page.svelte

This commit is contained in:
freearhey 2025-03-06 01:19:39 +03:00
parent 5c089d8b5c
commit 83fae6259f

View file

@ -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()