|
|
@@ -14,11 +14,9 @@ import PageTimeline from './PageTimeline';
|
|
|
/**
|
|
|
* Replace url in address bar with new path and query parameters
|
|
|
*/
|
|
|
-const replaceURLHistory = (pageId: string, path: string) => {
|
|
|
- if (pageId != null) {
|
|
|
- const queryParameters = window.location.search;
|
|
|
- window.history.replaceState(null, '', urljoin(path, queryParameters));
|
|
|
- }
|
|
|
+const replaceURLHistory = (path: string) => {
|
|
|
+ const queryParameters = window.location.search;
|
|
|
+ window.history.replaceState(null, '', urljoin(path, queryParameters));
|
|
|
};
|
|
|
|
|
|
const NotFoundPage = (): JSX.Element => {
|
|
|
@@ -29,7 +27,7 @@ const NotFoundPage = (): JSX.Element => {
|
|
|
// replace url in address bar
|
|
|
useEffect(() => {
|
|
|
if (pageId == null || path == null) return;
|
|
|
- replaceURLHistory(pageId, path);
|
|
|
+ replaceURLHistory(path);
|
|
|
}, [pageId, path]);
|
|
|
|
|
|
const navTabMapping = useMemo(() => {
|