From d4c7ebfafe2f41bda4ba7fe15e51e25ee391e7c7 Mon Sep 17 00:00:00 2001 From: NihadBadalov <32594553+NihadBadalov@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:03:09 +0100 Subject: [PATCH] Fix: Correct redirect usage --- src/pages/List.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/List.vue b/src/pages/List.vue index 58b23f13..c24542eb 100644 --- a/src/pages/List.vue +++ b/src/pages/List.vue @@ -12,12 +12,12 @@ export default { components: { MonitorList, }, + async mounted() { + if (!mobile.computed.isMobile()) { + this.$router.push("/dashboard"); + } + }, }; - -mobile.methods.onResize(); -if (!mobile.computed.isMobile(mobile.methods.windowWidth) && window.location.pathname === "/list") { - window.location.href = "/dashboard"; -}