Open itaykat opened 7 months ago
I solved it by adding an empty array as a dependency in the useeffect in the nav.tsx component.
I'm not sure it's the right thing to do, but it works.
I had the same problem, but when I remove the dependency array then the navigation will not work correctly and the "Back to all posts" menu will take back to the all sites page. My solution for the issue to add the siteId to the dependency list in the nav.tsx, so finally it looks like this.
useEffect(() => {
if (segments[0] === "post" && id && !siteId) {
getSiteFromPostId(id).then((id) => {
setSiteId(id);
});
}
}, [segments, id, siteId]);
When entering a specific post, the page generates non stop POST requests to thttps://app.domain.com/post/