Skip to content

Commit 763dbfc

Browse files
committed
use props in collector.vue to avoid unused variable hack
1 parent d420fc1 commit 763dbfc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

site/frontend/src/pages/status_new/collector.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ const props = defineProps<{
55
collector: CollectorConfigAndWork;
66
}>();
77
8-
/* trick typescript into thinking props is used. We _have_ to define it else
9-
* `collector` in the below code is untyped and thus fails to compile */
10-
<any>props;
11-
128
function statusClass(c: CollectorConfig): string {
139
return c.isActive ? "active" : "inactive";
1410
}
@@ -20,7 +16,7 @@ function statusClass(c: CollectorConfig): string {
2016
<div class="collector-name">
2117
<span>
2218
<strong class="collector-sm-padding-right">{{
23-
collector.config.name
19+
props.collector.config.name
2420
}}</strong>
2521
<span
2622
class="collector-sm-padding-left-right collector-left-divider"

0 commit comments

Comments
 (0)