Skip to content
Snippets Groups Projects
Commit 3f2ab08b authored by moon's avatar moon
Browse files

lint:fixed

parent d1f68473
No related branches found
No related tags found
No related merge requests found
<template>
<section>
<div class="h-1/2 overflow-y-auto shadow-md sm:rounded-lg">
<h2 v-if="error" class="text-red-500">
<h2
v-if="error"
class="text-red-500"
>
{{ errorMsg }}
</h2>
<h5 v-if="!showTable" class="text-center">No contribution made yet.</h5>
<h5
v-if="!showTable"
class="text-center"
>
No contribution made yet.
</h5>
<table
v-else
......@@ -32,7 +40,10 @@
</tr>
</thead>
<tbody class="overflow-y-scroll w-full" style="height: 2vh">
<tbody
class="overflow-y-scroll w-full"
style="height: 2vh"
>
<tr
v-for="items in topContributors"
:key="items.id"
......@@ -85,17 +96,17 @@
</template>
<script>
let host = require("@/components/js/const").apiHost;
let host = require('@/components/js/const').apiHost;
export default {
props: ["id", "entity"],
props: ['id', 'entity'],
data() {
return {
tableHeader: ["Name", "Contributions"],
tableHeader: ['Name', 'Contributions'],
isDev: process.env.NODE_ENV === "development",
isDev: process.env.NODE_ENV === 'development',
topContributors: null,
error: false,
errorMsg: "",
errorMsg: '',
showTable: true,
};
},
......@@ -106,7 +117,7 @@ export default {
methods: {
async getContributors() {
if (this.isDev) {
host = require("@/components/js/const").devApiHost;
host = require('@/components/js/const').devApiHost;
}
try {
......@@ -121,7 +132,7 @@ export default {
}
this.error = false;
this.errorMsg = "";
this.errorMsg = '';
const response = await res.json();
const convertedArray = response.filteredEntries.map((e) => ({
......@@ -153,7 +164,7 @@ export default {
syncedList[i].rank = rank;
}
if (this.id === "all" && this.entity === "all") {
if (this.id === 'all' && this.entity === 'all') {
this.topContributors = syncedList;
} else {
let top10Contributors = syncedList.filter((list) => list.rank <= 10);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment