fix: sorting on 'library' page

This commit is contained in:
Sean Yesmunt 2019-06-20 00:06:16 -04:00
parent 34c948bed7
commit 033037e61c
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +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_OLD ? uris.reverse() : uris;
const sortedUris = uris && currentSort === SORT_NEW ? uris.slice().reverse() : uris;
const hasUris = uris && !!uris.length;
function handleSortChange() {

View file

@ -294,4 +294,4 @@
"Post": "Post",
"Channel": "Channel",
"No modifier provided after separator %s.": "No modifier provided after separator %s."
}
}