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

Optimization: Post 404 #54

Closed
amirfakhrullah opened this issue Jun 20, 2022 · 0 comments · Fixed by #55
Closed

Optimization: Post 404 #54

amirfakhrullah opened this issue Jun 20, 2022 · 0 comments · Fixed by #55
Assignees

Comments

@amirfakhrullah
Copy link
Owner

  • pre-check if post with id query exists or not
  • to eliminate over-fetching post data in getServerSideProps, only select id
  • redirect to 404 if not exist,
  • return id as a prop to the component if post exist
@amirfakhrullah amirfakhrullah self-assigned this Jun 20, 2022
amirfakhrullah added a commit that referenced this issue Jun 20, 2022
#54 - checkings if post exist before render
@amirfakhrullah amirfakhrullah linked a pull request Jun 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant