fix: sorting on 'library' page
This commit is contained in:
parent
8f6e5e7559
commit
68a18556bf
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ type Props = {
|
|||
export default function ClaimList(props: Props) {
|
||||
const { uris, headerAltControls, injectedItem, loading, persistedStorageKey, empty, meta, type, header } = props;
|
||||
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
|
||||
const sortedUris = uris && currentSort === SORT_NEW ? uris.slice().reverse() : uris;
|
||||
const hasUris = uris && !!uris.length;
|
||||
const sortedUris = (hasUris && (currentSort === SORT_NEW ? uris : uris.slice().reverse())) || [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue