Closed seanmturley closed 7 months ago
This was a huge commit. Summary of work required:
getHomeCards
, to query a list of subreddits and collate the returned data. This required the implementation of a custom queryFn.cardsLoader
to query the new API endpoint a list of subreddits when on the homepage.CardsContainer
, to conditionally chose the correct card-related API endpoint for the homepage vs other pages. This had to be done in a container component because hooks can't be called conditionally, precluding the addition of the necessary logic within the Cards
component itself.The current functionality of the homepage is to pull a full batch of 25 posts from each of 3 arbitrarily selected subreddits. The cards are then displayed without any additional sorting i.e. each subreddit's posts are grouped together. This will be refined and improved as part of #160.
Description
The homepage was initially set up to pull posts exclusively from r/EarthPorn. This should be expanded to include at least a few other similar subreddits.
Tasks
cardsLoader
to make requests to multiple subreddits on the homepageConsiderations
getSubreddits
query i.e. by appending "&limit=5" to the query string.Subreddit candidates
See also: r/sfwpornnetwork, which includes a directory of nature related subreddits