From 3363c574c996d6d173290086b1624fd475d289aa Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Mon, 22 Mar 2021 00:13:52 +0100 Subject: [PATCH] Use $-assignments instead of store.set --- ts/graphs/RangeBox.svelte | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ts/graphs/RangeBox.svelte b/ts/graphs/RangeBox.svelte index b2449ec45..157420444 100644 --- a/ts/graphs/RangeBox.svelte +++ b/ts/graphs/RangeBox.svelte @@ -31,12 +31,10 @@ $: { switch (searchRange as SearchRange) { case SearchRange.Deck: - displayedSearch = "deck:current"; - search.set(displayedSearch); + $search = displayedSearch = "deck:current"; break; case SearchRange.Collection: - displayedSearch = ""; - search.set(displayedSearch); + $search = displayedSearch = ""; break; } } @@ -44,10 +42,10 @@ $: { switch (revlogRange as RevlogRange) { case RevlogRange.Year: - days.set(365); + $days = 365; break; case RevlogRange.All: - days.set(0); + $days = 0; break; } } @@ -55,7 +53,7 @@ const searchKeyUp = (event: KeyboardEvent) => { // fetch data on enter if (event.key === "Enter") { - search.set(displayedSearch); + $search = displayedSearch; } };