You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think adding an additional parameter to the existing useEvents hook would suffice? It already has support for all of the options that you mention (and some more).
Usage would be something like this:
// Pass in null as first argument to fetch for all nations,// or you can specify an array of nations to exclude using `excludeOids`constresult=useEvents(null,{// before: new Date(..),// after: new Date(..),// or whatever time filtering you want to use // // Specify the initial amount of events to load (per page) amount: 5,//// This will be the new parametersortBy: 'popularity'})
The sortBy option will default to none (just like the current hook) and will allow you to manually specify how you want the events ordered. Doing it like this means that we can easily add new types of sorting for events in the future.
To fetch popular events from the server we need an associated hook. Passing arguments could be:
The text was updated successfully, but these errors were encountered: