fix: clear frontend lint warnings

This commit is contained in:
sagitchu
2026-04-26 18:22:54 +08:00
parent 24d0b1e864
commit 0f1c5c8387
4 changed files with 4 additions and 11 deletions
@@ -360,11 +360,7 @@ export const useDashboardData = (): DashboardDataState => {
if (updateTime > storedTime) { if (updateTime > storedTime) {
setIsAnnouncementModalOpen(true); setIsAnnouncementModalOpen(true);
} }
} catch (err) { } catch {
console.warn(
"Failed to read localStorage for announcement state",
err,
);
setIsAnnouncementModalOpen(true); setIsAnnouncementModalOpen(true);
} }
} else { } else {
@@ -385,8 +381,8 @@ export const useDashboardData = (): DashboardDataState => {
"flvx_announcement_seen_time", "flvx_announcement_seen_time",
announcement.update_time.toString(), announcement.update_time.toString(),
); );
} catch (err) { } catch {
console.warn("Failed to set localStorage for announcement state", err); // Ignore localStorage write failures and keep the modal dismissed.
} }
} }
}, [announcement]); }, [announcement]);
+1 -1
View File
@@ -2600,7 +2600,7 @@ export default function ForwardPage() {
try { try {
document.execCommand("copy"); document.execCommand("copy");
toast.success(`已复制${label}`); toast.success(`已复制${label}`);
} catch (err) { } catch {
toast.error("复制失败"); toast.error("复制失败");
} }
document.body.removeChild(textArea); document.body.removeChild(textArea);
-1
View File
@@ -10,7 +10,6 @@
*/ */
import { registerTheme } from "./registry"; import { registerTheme } from "./registry";
// ── Built-in themes ────────────────────────────────────────────────────────── // ── Built-in themes ──────────────────────────────────────────────────────────
import defaultTheme from "./default"; import defaultTheme from "./default";
import cyberpunkTheme from "./example-cyberpunk"; import cyberpunkTheme from "./example-cyberpunk";
-2
View File
@@ -117,8 +117,6 @@ export function activateTheme(id: string): void {
const pkg = installed.get(id); const pkg = installed.get(id);
if (!pkg) { if (!pkg) {
console.warn(`[FLVX themes] Theme "${id}" is not registered.`);
return; return;
} }