Remove redundant alias filter effect from Svelte components to streamline data handling
- Eliminated the `$effect` that applied alias changes in both the main and users pages, improving performance and reducing unnecessary checks. - This change enhances the clarity of the alias filter logic and maintains the focus on essential data updates.
This commit is contained in:
@@ -251,11 +251,6 @@ async function handleAliasFilterChange(nextAlias: string) {
|
|||||||
void load();
|
void load();
|
||||||
});
|
});
|
||||||
|
|
||||||
$effect(() => {
|
|
||||||
if (typeof window === 'undefined') return;
|
|
||||||
void applyAliasIfChanged(aliasFilter);
|
|
||||||
});
|
|
||||||
|
|
||||||
let staleSeconds = $derived.by(() =>
|
let staleSeconds = $derived.by(() =>
|
||||||
lastSuccessAtMs == null ? null : Math.max(0, Math.floor((nowMs - lastSuccessAtMs) / 1000))
|
lastSuccessAtMs == null ? null : Math.max(0, Math.floor((nowMs - lastSuccessAtMs) / 1000))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -151,11 +151,6 @@
|
|||||||
void load();
|
void load();
|
||||||
});
|
});
|
||||||
|
|
||||||
$effect(() => {
|
|
||||||
if (typeof window === 'undefined') return;
|
|
||||||
void applyAliasIfChanged(aliasFilter);
|
|
||||||
});
|
|
||||||
|
|
||||||
let staleSeconds = $derived.by(() =>
|
let staleSeconds = $derived.by(() =>
|
||||||
lastSuccessAtMs == null ? null : Math.max(0, Math.floor((nowMs - lastSuccessAtMs) / 1000))
|
lastSuccessAtMs == null ? null : Math.max(0, Math.floor((nowMs - lastSuccessAtMs) / 1000))
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user