Skip to content

Commit

Permalink
Redirect to default --> ResolveUriScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminaaron committed Oct 28, 2024
1 parent ce5d122 commit dd6abc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Handle404Redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ const Handle404Redirect = () => {
const pathname = params.get("pathname");
if (!pathname) return;
const hash = params.get("hash");
const decodedRoute = decodeURIComponent(pathname);
const decodedPathname = decodeURIComponent(pathname);
if (!(decodedPathname === "/default" && hash)) return; // support other redirects also TODO
const decodedHash = decodeURIComponent(hash || '');
console.log("-->", decodedRoute, decodedHash);
// navigate(decodedRoute + decodedHash, { replace: true });
console.log("navigating to: ", decodedPathname, decodedHash);
navigate(decodedPathname + decodedHash, { replace: true });
}, [location, navigate]);

return null;
Expand Down

0 comments on commit dd6abc8

Please sign in to comment.