Skip to content

Commit 39e6bbe

Browse files
committed
Fix badge icon for limit during sorting
1 parent 64da821 commit 39e6bbe

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"script:zip": "powershell scripts/zip.ps1"
1111
},
1212
"dependencies": {
13+
"@vueuse/core": "^10.2.1",
1314
"chart.js": "^4.3.0",
1415
"date-fns": "^2.30.0",
1516
"rollup-plugin-copy": "^3.4.0",

pnpm-lock.yaml

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BadgeIcons.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ export default {
1212
</script>
1313

1414
<script lang="ts" setup>
15-
import { computed, onMounted, ref } from 'vue';
15+
import { computed } from 'vue';
1616
import { useI18n } from 'vue-i18n';
1717
import { TypeOfList, TypeOfUrl } from '../utils/enums';
1818
import { isDomainInLimits } from '../compositions/limit-list';
19+
import { computedAsync } from '@vueuse/core';
1920
2021
const { t } = useI18n();
2122
@@ -25,11 +26,9 @@ const props = defineProps<{
2526
listType: TypeOfList;
2627
}>();
2728
28-
onMounted(async () => {
29-
isLimit.value = await isDomainInLimits(props.url);
30-
});
31-
32-
const isLimit = ref<boolean>();
29+
const isLimit = computedAsync(async () => {
30+
return await isDomainInLimits(props.url);
31+
}, false);
3332
3433
const showDocumentBadge = computed(() => props.type == TypeOfUrl.Document);
3534
const showLimitBadge = computed(() => props.listType == TypeOfList.Today && isLimit.value == true);

0 commit comments

Comments
 (0)