sort by functionallity

This commit is contained in:
Gal Elmalah
2020-10-11 11:42:05 +03:00
committed by Vishnu Ks
parent de1bba855f
commit c94bd9f3b3
5 changed files with 5429 additions and 8433 deletions

View File

@@ -19,6 +19,7 @@ function myFunction(setMaximumBooksToShow, maximumBooksToShow) {
export default ({ data }) => {
let [maximumBooksToShow, setMaximumBooksToShow] = useState(12)
console.log({data})
useEffect(() => {
window.document.onscroll = () =>
myFunction(setMaximumBooksToShow, maximumBooksToShow)
@@ -44,7 +45,7 @@ export const query = graphql`
query MyQuery {
allBooksJson(
sort: {
fields: [rating]
fields: [title]
order: DESC
}
) {