Closed nick-y-ito closed 4 months ago
@kanta1207 cc @ShoeheyOt Thank you for the suggestion and giving me a new knowledge.
However, I tried it, but it did not bring the expected behavior. With the current code, the food data is re-fetched over again whenever the filter is updated. It causes the "referer" to be the "/foods" URL.
Here is why it happens:
Dynamic Nature of force-dynamic Components: By marking a component with force-dynamic, you're explicitly indicating that the component might need to update based on changes in the application's state or route. When you perform a route change with router.replace(), Next.js interprets this as a potential state change that could affect the force-dynamic components, causing them to re-render to ensure they reflect the latest application state.
https://chat.openai.com/share/e5429575-91aa-4585-9332-aa926bfd0085
Therefore, I have decided to keep it as it behaves for now. So, please review this PR with the current state.
Created the issue: #283 Mentioned this problem in #262
@kanta1207 Thank you for your review 😄
Overview
This PR corrects the link of the back button on the header of each page.
Changes
Please take a look at the comments I left in each file in this PR.
Review points
References
Notes
Screen Captures
https://github.com/nishiki-tech/nishiki-frontend/assets/99148565/6757dbf6-a2ee-4e06-a26a-df2dd589c166
Assignee Checklist:
Reviewer Checklist: