Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor features #150

Merged
merged 8 commits into from
Nov 1, 2024
Merged

Refactor features #150

merged 8 commits into from
Nov 1, 2024

Conversation

ctrlsam
Copy link
Contributor

@ctrlsam ctrlsam commented Nov 1, 2024

What kind of change does this PR introduce?

Refactoring

If relevant, did you update the documentation?

Yes, added to README to inform the TMDB proxy is optional, which reduces the complexity of setup for development.

Summary

  1. Reduced reused code for features (e.g. Popular, Recently Released, etc) by making the fetch URL dynamic to the type required.
  2. Made TMDB PROXY optional - an improvement but could be cleaner
  3. Added pagination to Movies section - have not added to others yet as they are not client side components and would need a bit more work, but now allows to seek for more! 🍿

Other information
@avalynndev it may be worth considering making TMDB api calls servers-side only as the current setup leaks API key to clients. BTW love the project, will be happy to contribute to some more work around this, such as moving the fetch requests outside of the component.

Thanks,

Sam.

@ctrlsam ctrlsam requested a review from avalynndev as a code owner November 1, 2024 11:01
Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for enjoytown ready!

Name Link
🔨 Latest commit 4569c88
🔍 Latest deploy log https://app.netlify.com/sites/enjoytown/deploys/6724ec93f30e330008af3dc8
😎 Deploy Preview https://deploy-preview-150--enjoytown.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@avalynndev
Copy link
Owner

brother how did u read my brain and do this before i could 0-0

Copy link
Owner

@avalynndev avalynndev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey sam,
Your changes are very much appreciated. great work!!

  • Made TMDB PROXY optional.. was not an idea i would have got.. good work on that
  • Reduced reused code for features.. was an idea i wanted to have but was too busy to think about it.. thank a lot for adding it
  • Pagination: you have tried to implement this feat but somehow it doesn't work properly 0-0

have a look at the deployment here: https://deploy-preview-150--enjoytown.netlify.app
Kindly try fixing it 0-0.
Thanks,
Avalynndev

@avalynndev
Copy link
Owner

Regarding the Other Information:
you got a point there.. i am thinking about fetching details similar to plotwist. If you are interested in working on this please try..

Thanks again,
avalynndev

@ctrlsam
Copy link
Contributor Author

ctrlsam commented Nov 1, 2024

Apart from this Pagination issue.. i think you have forgotten to change the item names for Trending and Popular ANIME.. as there is different items for trending and different for recent anime 0-0
Screenshot 2024-11-01 at 5 02 31 PM

I had a look on the test deploy and it seems that the proxy is not forwarding the page url parameter. What is the reason for the proxy - does the raw TMDB url not work with your hosting provider?

It might be worth trying to implement the site without a proxy as it can add some complexity to the site and challenges, such as observed above. But there may be a reason I'm missing.

Could you elaborate for this one:
"... forgotten to change the item names for Trending and Popular ANIME"

I had a look and wasn't able to figure out what was wrong with the ANIME feature section. Please let me know so I can address it.

Thanks :)

@avalynndev
Copy link
Owner

hey sam.. i am going out ATM so leave the pagination for now..
in the anime section the rating episodes and description are not being shown for Trending and Popular... check the previous files of anime trending and popular sections for reference..
thanks again

@ctrlsam
Copy link
Contributor Author

ctrlsam commented Nov 1, 2024

Ahh I see now! I've made a commit that should fix the missing ANIME description and ep. title.

@avalynndev
Copy link
Owner

Let me look into your code for pagination and try fixing it

Copy link
Owner

@avalynndev avalynndev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes working

@avalynndev
Copy link
Owner

@ctrlsam could you work on other features like the ones mentioned in #129 or Upcoming Feat section?
https://github.com/users/avalynndev/projects/1

@avalynndev avalynndev merged commit 7ee9d14 into avalynndev:main Nov 1, 2024
5 checks passed
@ctrlsam ctrlsam deleted the refactor-features branch November 1, 2024 21:26
GitGitro added a commit to GitGitro/enjoytown that referenced this pull request Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants