mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 23:39:15 +01:00
don't use i18n namespaces
there's no need to keep reloading different parts of the object we already cached
This commit is contained in:
@@ -66,18 +66,18 @@ const filterValues: GetAlbumList2TypeBase[] = [
|
||||
]
|
||||
|
||||
const AlbumFilterButton = withSuspenseMemo(() => {
|
||||
const { t } = useTranslation('resources.album.lists')
|
||||
const { t } = useTranslation()
|
||||
const filterType = useStoreDeep(store => store.settings.screens.library.albumsFilter.type)
|
||||
const setFilterType = useStore(store => store.setLibraryAlbumFilterType)
|
||||
|
||||
return (
|
||||
<FilterButton
|
||||
data={filterValues.map(value => ({ value, text: t(value) }))}
|
||||
data={filterValues.map(value => ({ value, text: t(`resources.album.lists.${value}`) }))}
|
||||
value={filterType}
|
||||
onSelect={selection => {
|
||||
setFilterType(selection as GetAlbumList2TypeBase)
|
||||
}}
|
||||
title={t('sort')}
|
||||
title={t('resources.album.lists.sort')}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user