sort by functionallity
This commit is contained in:
@@ -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
|
||||
}
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user