Redirect from /catalog to last catalog page (#3807)

* Redirect from /catalog to last catalog page

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Cleaning up

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Cleaning up more

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Splitting url params to pass in catalogURL()

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-09-29 09:04:54 +03:00
1 parent 8bca8dd7dc
commit 6b123dc4c0
5 files changed
+23 -10

No files matched your search

+1 -2
View File
@@ -30,7 +30,6 @@ import { ipcRendererOn } from "../../../common/ipc";
import { watchHistoryState } from "../../remote-helpers/history-updater";
import { isActiveRoute, navigate } from "../../navigation";
import { catalogRoute, catalogURL } from "../../../common/routes";
import { previousActiveTab } from "../+catalog";
interface Props extends React.HTMLAttributes<any> {
}
@@ -72,7 +71,7 @@ export const TopBar = observer(({ children, ...rest }: Props) => {
};
const goHome = () => {
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
navigate(catalogURL());
};
const goBack = () => {