diff --git a/src/components/TutorialModal.vue b/src/components/TutorialModal.vue index 968f64268..d63e6d503 100644 --- a/src/components/TutorialModal.vue +++ b/src/components/TutorialModal.vue @@ -317,9 +317,7 @@ export default { if (target === 'home' || target === 'new') { if (target === 'home') return; this.setTutorialActive(name); - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); this.closeTutorialMenu(); } else if ( Object.keys(this.finished).includes(previous) || diff --git a/src/components/payment/PaymentOptions.vue b/src/components/payment/PaymentOptions.vue index ff3e3cf35..b30826274 100644 --- a/src/components/payment/PaymentOptions.vue +++ b/src/components/payment/PaymentOptions.vue @@ -86,9 +86,7 @@ export default { }, methods: { goToHome() { - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); }, goToPayment() { this.$router.push({ diff --git a/src/components/repository/sidebar/SideBar.vue b/src/components/repository/sidebar/SideBar.vue index edf5f7449..547966270 100644 --- a/src/components/repository/sidebar/SideBar.vue +++ b/src/components/repository/sidebar/SideBar.vue @@ -599,10 +599,14 @@ export default { path !== this.$router.currentRoute.name || path === 'repository-settings' ) { - this.$router.push({ - name: `${path}`, - ...opts, - }); + if (path === 'home') { + this.$router.push('/home'); + } else { + this.$router.push({ + name: `${path}`, + ...opts, + }); + } } }, setInitialSelectedMenu() { diff --git a/src/router/index.js b/src/router/index.js index e0cb38d1c..dae090ccf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -130,11 +130,6 @@ const router = new Router({ } }, }, - { - path: '/home', - name: 'home', - component: Home, - }, { path: '/new/', name: 'new', diff --git a/src/views/CreateRepository.vue b/src/views/CreateRepository.vue index 0a318cf4c..fd18e4b96 100644 --- a/src/views/CreateRepository.vue +++ b/src/views/CreateRepository.vue @@ -1,6 +1,6 @@ @@ -14,9 +14,7 @@ export default { CreateRepositoryForm, }, computed: { - ...mapGetters([ - 'authenticated', - ]), + ...mapGetters(['authenticated']), }, mounted() { this.checkIsAuthenticated(); @@ -24,12 +22,10 @@ export default { methods: { checkIsAuthenticated() { if (!this.authenticated) { - this.$router.push({ - name: 'home' - }); + this.$router.push('/home'); } - } - } + }, + }, }; @@ -38,5 +34,4 @@ export default { height: 100vh; width: 100%; } - diff --git a/src/views/LandingPage.vue b/src/views/LandingPage.vue index 5eb10279f..d83b965a9 100644 --- a/src/views/LandingPage.vue +++ b/src/views/LandingPage.vue @@ -129,9 +129,7 @@ export default { }, watch: { authenticated() { - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); }, }, mounted() { @@ -141,9 +139,7 @@ export default { }, methods: { showAllBots() { - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); }, signIn() { this.$router.push({ diff --git a/src/views/auth/RecoverPassword.vue b/src/views/auth/RecoverPassword.vue index bdd10b77e..74d8f5912 100644 --- a/src/views/auth/RecoverPassword.vue +++ b/src/views/auth/RecoverPassword.vue @@ -29,9 +29,7 @@ export default { }, methods: { onAuthenticated() { - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); }, }, }; diff --git a/src/views/auth/SignIn.vue b/src/views/auth/SignIn.vue index 3b6c57e8e..8e403e5dc 100644 --- a/src/views/auth/SignIn.vue +++ b/src/views/auth/SignIn.vue @@ -41,9 +41,7 @@ export default { }, methods: { onAuthenticated() { - this.$router.push({ - name: 'home', - }); + this.$router.push('/home'); }, goToCreate() { this.$router.push({ diff --git a/src/views/auth/SignUp.vue b/src/views/auth/SignUp.vue index afb4e864a..8bfa32906 100644 --- a/src/views/auth/SignUp.vue +++ b/src/views/auth/SignUp.vue @@ -88,13 +88,16 @@ export default { }, watch: { authenticated() { - this.$router.push({ - name: - this.authenticated && - runtimeVariables.get('VUE_APP_BOTHUB_WEBAPP_PAYMENT_ENABLED') - ? 'payment-options' - : 'home', - }); + if ( + this.authenticated && + runtimeVariables.get('VUE_APP_BOTHUB_WEBAPP_PAYMENT_ENABLED') + ) { + this.$router.push({ + name: 'payment-options', + }); + } else { + this.$router.push('/home'); + } }, }, mounted() { diff --git a/src/views/repository/content/Bases.vue b/src/views/repository/content/Bases.vue index 021f7e9d4..5e48b4afd 100644 --- a/src/views/repository/content/Bases.vue +++ b/src/views/repository/content/Bases.vue @@ -9,7 +9,7 @@ type="tertiary" iconCenter="arrow_left_alt" scheme="neutral-dark" - @click="$router.push({ name: 'home' })" + @click="$router.push('/home')" />