From 91446bb455f3170e512035acd7869a3056d47b17 Mon Sep 17 00:00:00 2001 From: Jeffrey Li Date: Mon, 17 Aug 2020 13:51:31 -0400 Subject: [PATCH] remove newsletter modal button --- middleware/router-auth.ts | 3 +++ pages/newsletters/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/middleware/router-auth.ts b/middleware/router-auth.ts index e3db717..ed03133 100644 --- a/middleware/router-auth.ts +++ b/middleware/router-auth.ts @@ -4,6 +4,9 @@ import type {Route} from 'vue-router' export default function({store, redirect, route} : Context) { // if(route.name == null) redirect ('/') + console.log(route.name); + if(route.name == "index") return; + if(store.state.auth.user != null && (route.name == null || route?.name?.split('/').some(record => record == 'auth'))) { redirect('/home') diff --git a/pages/newsletters/index.vue b/pages/newsletters/index.vue index 84a4ac3..2f9280d 100644 --- a/pages/newsletters/index.vue +++ b/pages/newsletters/index.vue @@ -25,11 +25,11 @@
- +