mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 09:53:33 -04:00
Fix JS/TS lint issues in web frontend
- Remove unused imports (ES6UnusedImports): AboutDialog, Dashboard, SetupWizard, jobs.astro, login.astro, settings.astro, stats.astro - Prefix unused variables with underscore (JSUnusedLocalSymbols): _previousTheme, _lastJob, _loading, _detailLoading, _page, _success/_setSuccess - Remove unused cn/clsx/twMerge from SystemStatus.tsx - Add await to async calls (ES6MissingAwait) in JobManager, NotificationSettings, ScheduleSettings, SetupWizard, WatchFolders - Add void keyword for ignored promises (JSIgnoredPromiseFromCall) in useEffect callbacks across Dashboard, FileSettings, HardwareSettings, JobManager, LogViewer, NotificationSettings, ResourceMonitor, ScheduleSettings, SetupWizard, StatsCharts, SystemSettings, SystemStatus, TranscodeSettings, WatchFolders - CSS: Remove redundant background-color overridden by background shorthand; remove unused .btn selector - HTML: Associate labels with form inputs via for/id attributes in login.astro Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export default function NotificationSettings() {
|
||||
const [newEvents, setNewEvents] = useState<string[]>(["completed", "failed"]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchTargets();
|
||||
void fetchTargets();
|
||||
}, []);
|
||||
|
||||
const fetchTargets = async () => {
|
||||
@@ -63,7 +63,7 @@ export default function NotificationSettings() {
|
||||
setNewName("");
|
||||
setNewUrl("");
|
||||
setNewToken("");
|
||||
fetchTargets();
|
||||
await fetchTargets();
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@@ -74,7 +74,7 @@ export default function NotificationSettings() {
|
||||
if (!confirm("Remove this notification target?")) return;
|
||||
try {
|
||||
await apiFetch(`/api/settings/notifications/${id}`, { method: "DELETE" });
|
||||
fetchTargets();
|
||||
await fetchTargets();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user