mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
added paginated list/album list
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import FilterButton, { OptionData } from '@app/components/FilterButton'
|
||||
import GradientFlatList from '@app/components/GradientFlatList'
|
||||
import ListItem from '@app/components/ListItem'
|
||||
import { useFetchList, useFetchList2 } from '@app/hooks/list'
|
||||
import { useFetchList2 } from '@app/hooks/list'
|
||||
import { Artist } from '@app/models/music'
|
||||
import { ArtistFilterType } from '@app/models/settings'
|
||||
import { selectMusic } from '@app/state/music'
|
||||
import { selectSettings } from '@app/state/settings'
|
||||
import { useStore } from '@app/state/store'
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { Store, useStore } from '@app/state/store'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
|
||||
const ArtistRenderItem: React.FC<{ item: Artist }> = ({ item }) => (
|
||||
@@ -20,12 +19,14 @@ const filterOptions: OptionData[] = [
|
||||
{ text: 'Random', value: 'random' },
|
||||
]
|
||||
|
||||
const selectArtists = (store: Store) => store.entities.artists
|
||||
|
||||
const ArtistsList = () => {
|
||||
const fetchArtists = useStore(store => store.fetchLibraryArtists)
|
||||
const resetArtists = useStore(store => store.resetLibraryArtists)
|
||||
|
||||
const { refreshing, refresh } = useFetchList2(fetchArtists, resetArtists)
|
||||
const artists = useStore(store => store.entities.artists)
|
||||
const artists = useStore(selectArtists)
|
||||
|
||||
const filter = useStore(selectSettings.libraryArtistFilter)
|
||||
const setFilter = useStore(selectSettings.setLibraryArtistFiler)
|
||||
|
||||
Reference in New Issue
Block a user