From c2dc7906e47a05cecc6350fd6a3d6f6f955a3423 Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Tue, 6 Jul 2021 14:55:58 +0200
Subject: Frontend uses shared types

---
 packages/client/src/components/HomeHeader.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'packages/client/src/components/HomeHeader.vue')

diff --git a/packages/client/src/components/HomeHeader.vue b/packages/client/src/components/HomeHeader.vue
index 74e90f9..64e70e7 100644
--- a/packages/client/src/components/HomeHeader.vue
+++ b/packages/client/src/components/HomeHeader.vue
@@ -9,6 +9,7 @@
 
 <script lang="ts">
 import { defineComponent, ref } from "vue";
+import { Info } from "shared_types";
 
 export default defineComponent({
 	name: "HomeHeader",
@@ -17,10 +18,10 @@ export default defineComponent({
 		const about = ref("");
 
 		const fetchInfo = async() => {
-			const data = await (await fetch(`${window.location.protocol}//${window.location.host}/api/v1/info`)).json();
-			console.log(data.data);
-			title.value = data.data.title;
-			about.value = data.data.about;
+			const info: Info = (await (await fetch(`${window.location.protocol}//${window.location.host}/api/v1/info`)).json()).data;
+
+			title.value = info.title;
+			about.value = info.about;
 		};
 
 		return { title, about, fetchInfo };
-- 
cgit v1.2.3-18-g5258

