quiltingcode / happening-react-frontend

A react-based social media platform for sharing events in a small town
https://happening-react.herokuapp.com/
2 stars 1 forks source link

BUG: Review results not displaying on page in desktop #57

Open quiltingcode opened 1 year ago

quiltingcode commented 1 year ago

Describe the bug Now that a lot more future events have been created, when the reviews page loads, it doesn't find any past events in the first page of results so it doesn't display any and there is no way to force the scroll bar to push the inifinite scroll into action apart from on smaller screens where the scroll bar is there even if only one post loads. then you can push for more. On desktop you can't.

THe data length shows 22 events, but then when you filter for past dates only it only brings through 1 result. It doesn't automatically move onto page 2 of the results to go and find more entries to make up the initial ten max posts.

This is not good.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior I expect it to keep looking through page 2,3, etc. to find 10 valid results which match the filter requirements... but it doesn't,.

Screenshots image

Desktop (please complete the following information):

Additional context I have tried to filter the results within the UseEffect before mapping it down in the return render, but then I seem to get a lot of errors and nothng displayed. This solution does not work.

I need to figure out how to filter the date earlier before it gets filtered on the render, so that 10 full valid results are shown.

I need to go back and look at the API again I think.

quiltingcode commented 1 year ago

Filterset attribute less than or equal to added to the event_date filterset, and the frontend URL updated. This seems to be working now.