Removed unnecessary use of onBeforeMount in App.vue
authorAdam Dullage <redacted>
Tue, 30 Apr 2024 19:08:36 +0000 (20:08 +0100)
committerAdam Dullage <redacted>
Tue, 30 Apr 2024 19:08:36 +0000 (20:08 +0100)
client/App.vue

index f61ab0f0ffad69f0f69ef099d3beb4a955647573..b9083d1e8bbcb0aff2b7067378b20060766fbdb5 100644 (file)
@@ -7,7 +7,7 @@
 </template>\r
 \r
 <script setup>\r
-import { computed, onBeforeMount } from "vue";\r
+import { computed } from "vue";\r
 import { RouterView, useRoute } from "vue-router";\r
 \r
 import { getConfig } from "./api.js";\r
@@ -19,19 +19,17 @@ import PrimeToast from "./components/PrimeToast.vue";
 const globalStore = useGlobalStore();\r
 const route = useRoute();\r
 \r
-onBeforeMount(() => {\r
-  getConfig()\r
-    .then((data) => {\r
-      globalStore.authType = data.authType;\r
-    })\r
-    .catch(function (error) {\r
-      if (!error.handled) {\r
-        // TODO: Trigger unknown error toast\r
-        console.error(error);\r
-      }\r
-    });\r
-  loadStoredToken();\r
-});\r
+getConfig()\r
+  .then((data) => {\r
+    globalStore.authType = data.authType;\r
+  })\r
+  .catch(function (error) {\r
+    if (!error.handled) {\r
+      // TODO: Trigger unknown error toast\r
+      console.error(error);\r
+    }\r
+  });\r
+loadStoredToken();\r
 \r
 const showNavBar = computed(() => {\r
   return route.name !== "login";\r
git clone https://git.99rst.org/PROJECT