From 2e324a5e95483afa2cd617a82a89aaca5953156a Mon Sep 17 00:00:00 2001 From: Casper Beckman Date: Thu, 19 Sep 2024 18:43:33 +0200 Subject: [PATCH] =?UTF-8?q?ej=20o=C3=A4ndlig=20loop=20n=C3=A4r=20direktl?= =?UTF-8?q?=C3=A4nk=20till=20s=C3=A5ng=20och=20fixad=20url=20till=20root?= =?UTF-8?q?=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Navbar.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index d23b5b1..418aa92 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -31,13 +31,7 @@ export default defineComponent({ data() { return { showSettings: false } }, methods: { goBack () { - if (history.state.back === null) { - // The back button in the Navbar should never leave the sångbok page. (See issue #29) - // Hence if we got here directly, we will compute the path to go to instead of using history to go back. - this.$router.push(getParentPath(this.$route)) - } else { - this.$router.go(-1) - } + this.$router.push(getParentPath(this.$route)) } }, render() { @@ -48,7 +42,7 @@ export default defineComponent({ { !this.hideBackButton && } -
Sångboken
+
Sångboken
{!this.showSettings && } {this.showSettings && }