From 55ab996795efdb125437d5728b50d03ac5d2612d Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Wed, 9 Jun 2021 22:06:45 +0200
Subject: Added an about page

---
 .../client/src/components/RepositoryHeader.vue     | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

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

diff --git a/packages/client/src/components/RepositoryHeader.vue b/packages/client/src/components/RepositoryHeader.vue
index 9f37df4..50a1db9 100644
--- a/packages/client/src/components/RepositoryHeader.vue
+++ b/packages/client/src/components/RepositoryHeader.vue
@@ -12,33 +12,21 @@
 
 <script>
 import BaseBackButton from "@/components/BaseBackButton";
-import { ref } from "vue";
 
 export default {
 	name: "RepositoryHeader",
 	props: {
-		repository: {
+		name: {
+			type: String,
+			required: true
+		},
+		description: {
 			type: String,
 			required: true
 		}
 	},
 	components: {
 		BaseBackButton
-	},
-	setup(props) {
-		const name = ref("");
-		const description = ref("");
-
-		const fetchProjects = async() => {
-			const repository_data = await (await fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos/${props.repository}`)).json();
-			name.value = repository_data.data.name;
-			description.value = repository_data.data.description;
-		};
-
-		return { name, description, fetchProjects };
-	},
-	created() {
-		this.fetchProjects();
 	}
 };
 </script>
-- 
cgit v1.2.3-18-g5258

