mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
fix: recently visit should only use main paths (#7655)
Recently visited should only be main paths, so look like this **/segments** **/projects** and not have multiple slashes inside.
This commit is contained in:
parent
339e92f4eb
commit
3f76882465
@ -13,7 +13,10 @@ export const RecentlyVisitedRecorder = () => {
|
||||
useEffect(() => {
|
||||
if (!location.pathname) return;
|
||||
|
||||
const path = routes.find((r) => r.path === location.pathname);
|
||||
const path = routes.find(
|
||||
(r) =>
|
||||
r.path === location.pathname && r.path.indexOf('/', 1) === -1,
|
||||
);
|
||||
if (path) {
|
||||
setLastVisited({ pathName: path.path });
|
||||
} else if (featureMatch?.params.featureId) {
|
||||
|
Loading…
Reference in New Issue
Block a user