Fix text blinking in About

This commit is contained in:
Andrey 2023-05-03 22:12:25 +03:00
parent 76db2e388e
commit b025e444c5

View file

@ -3,7 +3,7 @@
import BackBtn from "./BackBtn.vue"; import BackBtn from "./BackBtn.vue";
import axios from 'axios' import axios from 'axios'
const codeStats = ref<string>('❌Не удалось загрузить❌') const codeStats = ref<string>('')
const age = ref<string>('') const age = ref<string>('')
interface ILang { interface ILang {
@ -12,7 +12,10 @@
async function getCodeStats() { async function getCodeStats() {
const resp = await axios.get<ILang[]>(`${window.location.origin}/api/v1/code_stats`) const resp = await axios.get<ILang[]>(`${window.location.origin}/api/v1/code_stats`)
if (resp.status !== 200) return; if (resp.status !== 200) {
codeStats.value = '❌Не удалось загрузить❌'
return;
}
if (!Object.keys(resp.data).length) { if (!Object.keys(resp.data).length) {
codeStats.value = 'ничего не писал(' codeStats.value = 'ничего не писал('
return; return;