Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
@@ -2,7 +2,15 @@
|
||||
import { watchdogStateLabels, type WatchdogState } from '$lib/watchdog.js';
|
||||
import Badge from './primitives/Badge.svelte';
|
||||
let { state }: { state: WatchdogState } = $props();
|
||||
const tone = $derived(state === 'attention' ? 'warning' : state === 'resolved' ? 'online' : state === 'recovering' ? 'info' : 'neutral');
|
||||
const tone = $derived(
|
||||
state === 'attention'
|
||||
? 'warning'
|
||||
: state === 'resolved'
|
||||
? 'online'
|
||||
: state === 'recovering'
|
||||
? 'info'
|
||||
: 'neutral'
|
||||
);
|
||||
</script>
|
||||
|
||||
<Badge variant={tone}>{watchdogStateLabels[state]}</Badge>
|
||||
|
||||
Reference in New Issue
Block a user