Skip to content

Implement titles page to view added/deleted tititles on a specific date#6

Draft
acollierr17 wants to merge 23 commits into
mainfrom
3-view-titles-on-date
Draft

Implement titles page to view added/deleted tititles on a specific date#6
acollierr17 wants to merge 23 commits into
mainfrom
3-view-titles-on-date

Conversation

@acollierr17

@acollierr17 acollierr17 commented Jul 1, 2023

Copy link
Copy Markdown
Owner

Pull Request Template

Description

A WIP, but this PR currently allows viewing what titles have been added/removed on a particular date. If it's an added piece of content, a link to the title on Netflix is also provided.

Currently, we have the title poster, title, and synopsis display. Then there's a page that lists a grid of all available dates. Clicking on a date will display the above content on its respective page.

Currently, these routes are statically generated at build time. We'll likely need to account for future builds and renders.

Fixes #3

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

- add components config file
- add card component
- update tailwind config
these image paths are relevant to netflix title posters
- add route for getting title information
- add route for getting daily titles
it's possible we may need to refactor this in this pr because of the add titles function. will test more

BREAKING CHANGE: may break add-new-titles-route
add functionality to view titles added/deleted on a specific date via the path params

still a WIP
@acollierr17 acollierr17 linked an issue Jul 1, 2023 that may be closed by this pull request
@vercel

vercel Bot commented Jul 1, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
netflix-refresh 🛑 Canceled (Inspect) Jul 13, 2023 10:19pm

this possibily fixes the 404 issue we're getting running on vercel with dynamic routes
this is in the case we're the main image cannot load for any reason

currently, doing it based on error, but hopefully can find a faster solution for one of instances
see if this will resolve the 404 issue. we do want non valid routes not generated or return in generateStaticParams to still 404
this fixes 404 on vercel routes where we have async/await in use
@acollierr17

Copy link
Copy Markdown
Owner Author

Resolved a Vercel issue with dynamic routes returning 404 in relation to vercel/next.js#51009.

Now I need to return a 404 if the date params in /titles/[date] is not found in generateStaticParams. I could essentially achieve this by having dynamicParams set to false.

@acollierr17 acollierr17 linked an issue Jul 13, 2023 that may be closed by this pull request
- remove redundant date param check
@acollierr17

acollierr17 commented Jul 22, 2023

Copy link
Copy Markdown
Owner Author

Since we're historically allowing titles on previous dates to be displayed, we should implement the ability to request data for individual titles if it's not in the database already.

if (!data) return <div>Not title found!</div>;

We can clearly resolve this on a per-request basis.

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.

bug: Data is added to Redis even if there are no titles View titles added/deleted on a particular day

1 participant