production routing not reloading page to new url
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
I have a fetch that pushes route based on result status. But it does not push route when successful.
1 Reply
Brown bearOP
const playAsGuest = async () => {
try {
const result = await fetch('/api/guest', {
method: 'POST',
credentials: 'include',
});
if (result.ok) {
router.push('/multiplayer');
return;
}
} catch (error) {
console.log(error);
}
};