Skip to content

Commit

Permalink
fix: default strategy data source (#1018)
Browse files Browse the repository at this point in the history
* fix: default strategy data source

Signed-off-by: David Dal Busco <[email protected]>

* chore: fmt

Signed-off-by: David Dal Busco <[email protected]>

---------

Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker authored Jan 9, 2025
1 parent 655ed2f commit 679a286
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
import MonitoringSentence from '$lib/components/modals/MonitoringSentence.svelte';
import Value from '$lib/components/ui/Value.svelte';
import {
missionControlMonitoring,
missionControlSettingsLoaded
missionControlConfigMonitoring,
missionControlUserDataLoaded
} from '$lib/derived/mission-control.derived';
import { i18n } from '$lib/stores/i18n.store';
let monitoringStrategy = $derived(
fromNullable(fromNullable($missionControlMonitoring?.cycles ?? [])?.strategy ?? [])
fromNullable(
fromNullable($missionControlConfigMonitoring?.cycles ?? [])?.default_strategy ?? []
)
);
</script>

{#if $missionControlSettingsLoaded}
{#if $missionControlUserDataLoaded}
<div in:fade>
<Value>
{#snippet label()}
Expand All @@ -25,7 +27,7 @@
{#if nonNullish(monitoringStrategy)}
<MonitoringSentence {monitoringStrategy} />
{:else}
&ZeroWidthSpace;
{$i18n.core.none}
{/if}
</p>
</Value>
Expand Down

0 comments on commit 679a286

Please sign in to comment.