Created
September 16, 2021 20:56
-
-
Save Origho-precious/864dd880b4f1cf2011540d41f5603347 to your computer and use it in GitHub Desktop.
slicedAnimeTitles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const slicedAnimeTitles = selector({ | |
key: "slicedAnimeTitles", | |
get: ({ get }) => { | |
const animes = get(animeTitles); | |
const pageNum = get(animeListPageNum); | |
const newAnimeList = [...animes]; | |
const arrIndex = pageNum === 0 ? 0 : pageNum * 50 + 1; | |
return newAnimeList.splice(arrIndex, 50); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment