Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit b46dcd5

Browse files
committed
fix: logger for location
1 parent 1eb90d8 commit b46dcd5

File tree

1 file changed

+7
-1
lines changed
  • packages/console-utils/xconsole-logger/src

1 file changed

+7
-1
lines changed

packages/console-utils/xconsole-logger/src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ const XConsoleLogger = ({
2323
unlisten()
2424
}
2525
}
26-
}, [logger, history])
26+
}, [logger, history]);
27+
28+
29+
// log initial path
30+
useEffect(() => {
31+
history && logger.log(history?.location?.pathname);
32+
}, [])
2733

2834
return null
2935
}

0 commit comments

Comments
 (0)