aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/components/RepositoryHeader.vue
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-06-09 22:06:45 +0200
committerHampusM <hampus@hampusmat.com>2021-06-09 22:06:45 +0200
commit55ab996795efdb125437d5728b50d03ac5d2612d (patch)
treefe0de086fdf7062bed9251173add9609f631949a /packages/client/src/components/RepositoryHeader.vue
parentde09be1b40a9338eb0e45bede01179a69f00269d (diff)
Added an about page
Diffstat (limited to 'packages/client/src/components/RepositoryHeader.vue')
-rw-r--r--packages/client/src/components/RepositoryHeader.vue22
1 files changed, 5 insertions, 17 deletions
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>