fix(bottom nav): replace path instead of going back

This commit is contained in:
Paul Makles
2022-01-15 15:46:48 +00:00
parent d3f1648556
commit ae0f317fa9
2 changed files with 8 additions and 11 deletions

View File

@@ -67,13 +67,13 @@ export default observer(() => {
onClick={() => {
if (settingsActive) {
if (history.length > 0) {
history.goBack();
history.replace(layout.getLastPath());
return;
}
}
const path = layout.getLastHomePath();
if (path === "/friends") {
if (path.startsWith("/friends")) {
history.push("/");
} else {
history.push(path);