diff --git a/frontend/.storybook/preview.tsx b/frontend/.storybook/preview.tsx index d5c5e0b..d369fa2 100644 --- a/frontend/.storybook/preview.tsx +++ b/frontend/.storybook/preview.tsx @@ -1,5 +1,5 @@ // Ignore missing type declarations for side-effect CSS import -// @ts-ignore +// @ts-expect-error - side-effect CSS import without type declarations import "../src/styles/index.css"; import type { Preview } from '@storybook/react-vite' diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ba8a710..4fe45d6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -101,7 +101,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", @@ -876,6 +875,27 @@ "integrity": "sha512-VYJy0uhFm9zTJ1TxBaW/pA8bjbOM/OttaNMwZ1RHG4JKyRG7DhSdiqD1ipQoAyoD22olUtxbP78W9xY3Wd11bg==", "license": "BSD-3-Clause" }, + "node_modules/@emnapi/core": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz", + "integrity": "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==", + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz", + "integrity": "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emnapi/wasi-threads": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", @@ -3424,7 +3444,6 @@ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -3714,7 +3733,6 @@ "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -3725,7 +3743,6 @@ "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -3736,7 +3753,6 @@ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -3812,7 +3828,6 @@ "integrity": "sha512-A0M6ua6H252bVjPvvtSgl2QA4+ET9S5Mtkb2GDyTxIhH/C4qDItT7RQNO5PhMC6NXGYXOR9dIalcDDgBKT7oFA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.60.1", "@typescript-eslint/types": "8.60.1", @@ -4043,7 +4058,6 @@ "integrity": "sha512-UDwuWGwXj646CBx/bQHOaJSX7np0I8JL/UKQYa1e4QrVHH8VdWtx8eaOuf8sy0ShwDgR6NjJAsp5eF6vjF6qng==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@blazediff/core": "1.9.1", "@vitest/mocker": "4.1.10", @@ -4067,7 +4081,6 @@ "integrity": "sha512-nMoXGEiRpT7m3W7NsbvrM2aKNwiNHZf+zEpUCvMteGjZFvfT96Q9fh7QyB98dvDWXiKvrLxA7bJ1mCOOv+JQPw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/browser": "4.1.10", "@vitest/mocker": "4.1.10", @@ -4092,7 +4105,6 @@ "integrity": "sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/utils": "4.1.10", @@ -4242,7 +4254,6 @@ "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/utils": "4.1.10", "pathe": "^2.0.3" @@ -4399,7 +4410,6 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4718,7 +4728,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -4820,7 +4829,6 @@ "resolved": "https://registry.npmjs.org/cesium/-/cesium-1.142.0.tgz", "integrity": "sha512-Z6mBxdeBS0lEXM7WAQgG8Q0FovXYAJpZsMOSWgd7dH28Ov+djJxWOlUMiG8jOai0TzeOYdYsMLgnYb2uB/aI/A==", "license": "Apache-2.0", - "peer": true, "workspaces": [ "packages/engine", "packages/widgets", @@ -5309,7 +5317,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -5399,7 +5406,6 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.4.0.tgz", "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", "license": "MIT", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -5787,7 +5793,6 @@ "devOptional": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -5857,7 +5862,6 @@ "integrity": "sha512-AyIKhnOBuOAdueD7RB3xB+YeAWScb9jHsJBgH2Hcde8InP5JYhqrRR6iTMHyTEwgENK54Cp44e4v8BwNhsuHuw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -6758,7 +6762,6 @@ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.30.tgz", "integrity": "sha512-emn+JoJjrN9YTpRDS5it/UI2SO9BAE37T6I3d963RxcZ81G9A4pr2SZTEiiaiKbzx+NKRg5BZ89fCL7gCJCUog==", "license": "MIT", - "peer": true, "engines": { "node": ">=16.9.0" } @@ -6829,7 +6832,6 @@ "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/immer" @@ -8885,7 +8887,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -8927,7 +8928,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -8940,7 +8940,6 @@ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.77.0.tgz", "integrity": "sha512-Sslh9YDYc0GDlWT/lxasnIduNo4v3yyvqRGvmGKUre5AFjDs/HV9/OafHGD8d+sB2yoL4UIL9L8X9i0WlZZebg==", "license": "MIT", - "peer": true, "engines": { "node": ">=18.0.0" }, @@ -8964,7 +8963,6 @@ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.3.0.tgz", "integrity": "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==", "license": "MIT", - "peer": true, "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" @@ -9098,8 +9096,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/redux-thunk": { "version": "3.1.0", @@ -9695,7 +9692,6 @@ "integrity": "sha512-zkYxVZoDMj8njzZc3EH5UyY7885wpi9a1mmWVwFiNHSo+i5r2Go84E2OI1cdOctRymLkNvgs1j5jqAKA0ftBqg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@storybook/global": "^5.0.0", "@storybook/icons": "^2.0.2", @@ -10216,7 +10212,6 @@ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -10417,7 +10412,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", "license": "MIT", - "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", @@ -10511,7 +10505,6 @@ "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "4.1.10", "@vitest/mocker": "4.1.10", @@ -10768,7 +10761,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/frontend/src/components/EarthTwin.tsx b/frontend/src/components/EarthTwin.tsx index 9462af6..edc0934 100644 --- a/frontend/src/components/EarthTwin.tsx +++ b/frontend/src/components/EarthTwin.tsx @@ -48,7 +48,6 @@ function keplerToLatLonAlt(obj: CatalogObject, timeOffsetSec: number = 0): { lat const epochDate = obj.epoch ? new Date(obj.epoch) : new Date(); const now = new Date(); const elapsedDays = (now.getTime() - epochDate.getTime()) / 86400000 + (timeOffsetSec / 86400); - const meanMotionRadPerSec = (obj.mean_motion * 2 * Math.PI) / 86400; const currentMeanAnomaly = ((obj.mean_anomaly + (elapsedDays * obj.mean_motion * 360)) % 360) * Math.PI / 180; @@ -284,6 +283,7 @@ export const EarthTwin: React.FC = () => { }); viewerRef.current = viewer; + // eslint-disable-next-line react-hooks/set-state-in-effect setUseFallback(false); @@ -323,7 +323,7 @@ export const EarthTwin: React.FC = () => { setHoveredObject(obj); setTooltipPos({ x: movement.endPosition.x + 15, y: movement.endPosition.y - 10 }); } - } catch { } + } catch { /* ignore parse errors */ } } else { setHoveredObject(null); } @@ -348,7 +348,7 @@ export const EarthTwin: React.FC = () => { }); } } - } catch { } + } catch { /* ignore parse errors */ } } }, Cesium.ScreenSpaceEventType.LEFT_CLICK); @@ -377,6 +377,7 @@ export const EarthTwin: React.FC = () => { console.warn('Cesium initialization failed, using fallback', e); setUseFallback(true); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return ( diff --git a/frontend/src/components/layouts/FooterSocials.tsx b/frontend/src/components/layouts/FooterSocials.tsx index 2bbdcbc..5abf94c 100644 --- a/frontend/src/components/layouts/FooterSocials.tsx +++ b/frontend/src/components/layouts/FooterSocials.tsx @@ -1,5 +1,4 @@ import { - ArrowRight, Mail, Heart, } from "lucide-react"; diff --git a/frontend/src/components/layouts/MainLayout.tsx b/frontend/src/components/layouts/MainLayout.tsx index 8d92289..f800c5d 100644 --- a/frontend/src/components/layouts/MainLayout.tsx +++ b/frontend/src/components/layouts/MainLayout.tsx @@ -33,6 +33,7 @@ export const MainLayout: React.FC = () => { useEffect(() => { // Close mobile sidebar on route change + // eslint-disable-next-line react-hooks/set-state-in-effect setMobileSidebarOpen(false); }, [location.pathname]); diff --git a/frontend/src/components/layouts/MarketingLayout.tsx b/frontend/src/components/layouts/MarketingLayout.tsx index 591b8b7..182372b 100644 --- a/frontend/src/components/layouts/MarketingLayout.tsx +++ b/frontend/src/components/layouts/MarketingLayout.tsx @@ -35,9 +35,6 @@ function useScrollToHash() { }, [pathname, hash]); } -const footerLinkClass = - "font-body-ui text-[13px] text-[#8892A6] hover:text-[#E7EBF3] no-underline transition-ui"; - const navLinks = [ { label: "Product", to: "/product" }, { label: "Solutions", to: "/solutions" }, @@ -71,6 +68,7 @@ function MarketingNavBar() { const location = useLocation(); useEffect(() => { + // eslint-disable-next-line react-hooks/set-state-in-effect setMenuOpen(false); }, [location.pathname, location.hash]); @@ -192,9 +190,6 @@ function MarketingNavBar() { ); } -type FooterLink = - | { label: string; to: string; disabled?: false } - | { label: string; to?: undefined; disabled: true }; function MarketingFooter() { return ( diff --git a/frontend/src/components/ui/magic-card.tsx b/frontend/src/components/ui/magic-card.tsx index 409e2b4..0130263 100644 --- a/frontend/src/components/ui/magic-card.tsx +++ b/frontend/src/components/ui/magic-card.tsx @@ -90,6 +90,7 @@ export function MagicCard(props: MagicCardProps) { const { theme, systemTheme } = useTheme() const [mounted, setMounted] = useState(false) + // eslint-disable-next-line react-hooks/set-state-in-effect useEffect(() => setMounted(true), []) const isDarkTheme = useMemo(() => { diff --git a/frontend/src/components/ui/particles.tsx b/frontend/src/components/ui/particles.tsx index 87e03d7..22da28b 100644 --- a/frontend/src/components/ui/particles.tsx +++ b/frontend/src/components/ui/particles.tsx @@ -302,8 +302,11 @@ export const Particles: React.FC = ({ rafID.current = window.requestAnimationFrame(animateRef.current) } + // eslint-disable-next-line react-hooks/refs initCanvasRef.current = initCanvas + // eslint-disable-next-line react-hooks/refs onMouseMoveRef.current = onMouseMove + // eslint-disable-next-line react-hooks/refs animateRef.current = animate return ( diff --git a/frontend/src/pages/AIAgents.tsx b/frontend/src/pages/AIAgents.tsx index 4ccd8f6..ae6943d 100644 --- a/frontend/src/pages/AIAgents.tsx +++ b/frontend/src/pages/AIAgents.tsx @@ -1,7 +1,7 @@ import React, { useRef, useEffect } from 'react'; import { motion } from 'framer-motion'; import { MaterialIcon } from '@/components/MaterialIcon'; -import { useAgentRuns, useTriggerAgent } from '@/hooks/useApi'; +import { useAgentRuns } from '@/hooks/useApi'; import type { AgentRun, AgentDecision } from '@/services/api'; @@ -29,7 +29,7 @@ function logColor(agentName: string) { return 'text-on-surface-variant'; } -function formatLog(d: AgentDecision, runName: string): { tag: string; msg: string; colorClass: string; ts: string } { +function formatLog(d: AgentDecision): { tag: string; msg: string; colorClass: string; ts: string } { return { tag: `[${d.agent_name?.toUpperCase() ?? 'AGENT'}]`, msg: d.reasoning, @@ -42,7 +42,6 @@ function formatLog(d: AgentDecision, runName: string): { tag: string; msg: strin export const AIAgents: React.FC = () => { const terminalRef = useRef(null); const agentRunsQ = useAgentRuns({ size: 10 }); - const triggerM = useTriggerAgent(); const runs: AgentRun[] = agentRunsQ.data?.data ?? []; @@ -68,6 +67,7 @@ export const AIAgents: React.FC = () => { const clearTerminal = () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any)._clearedAt = Date.now(); }; @@ -244,7 +244,7 @@ export const AIAgents: React.FC = () => { ) : ( allDecisions.map((d, idx) => { - const log = formatLog(d, d.runName); + const log = formatLog(d); return (
{log.ts} diff --git a/frontend/src/pages/CollisionCenter.tsx b/frontend/src/pages/CollisionCenter.tsx index d83defb..75109b7 100644 --- a/frontend/src/pages/CollisionCenter.tsx +++ b/frontend/src/pages/CollisionCenter.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { MaterialIcon } from '@/components/MaterialIcon'; -import { useCollisions, useUpdateCollisionStatus, useCollisionEvaluate, useAgentRuns, useTriggerAgent } from '@/hooks/useApi'; +import { useCollisions, useUpdateCollisionStatus, useCollisionEvaluate, useAgentRuns } from '@/hooks/useApi'; import type { Collision } from '@/services/api'; @@ -61,7 +61,6 @@ export const CollisionCenter: React.FC = () => { const selected = conjunctions.find(c => c.id === selectedId) ?? conjunctions[0] ?? null; const latestRun = agentRuns.data?.data?.[0]; - const latestDecision = latestRun?.decisions?.[latestRun.decisions.length - 1]; return (
diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 8e4fd47..9ece103 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -3,13 +3,11 @@ import { motion } from 'framer-motion'; import { EarthTwin } from '@/components/EarthTwin'; import { MaterialIcon } from '@/components/MaterialIcon'; import { MagicCard } from '@/components/ui/magic-card'; -import { Particles } from '@/components/ui/particles'; import { useSpaceSummary } from '@/hooks/useApi'; import { useCollisions } from '@/hooks/useApi'; import { useAgentRuns } from '@/hooks/useApi'; import { useWeatherStatus } from '@/hooks/useApi'; import type { Collision, AgentDecision } from '@/services/api'; -import { toast } from 'sonner'; const riskColor = (level: string) => { switch (level) { diff --git a/frontend/src/pages/Debris.tsx b/frontend/src/pages/Debris.tsx index a672cc3..830d690 100644 --- a/frontend/src/pages/Debris.tsx +++ b/frontend/src/pages/Debris.tsx @@ -16,13 +16,6 @@ function altFromSMA(sma: number | null): number { return Math.round(sma - 6371); } -function sizeCategory(alt: number, inc: number | null): string { - - if (alt < 500) return 'SMALL'; - if (alt < 1000) return 'MEDIUM'; - return 'LARGE'; -} - function riskFromOrbit(obj: SpaceObject): 'HIGH' | 'MEDIUM' | 'LOW' { const alt = altFromSMA(obj.semimajor_axis); if (alt < 600) return 'HIGH'; @@ -53,8 +46,8 @@ export const Debris: React.FC = () => { const onSearch = (val: string) => { setSearchQuery(val); - clearTimeout((window as any)._debrisSearchTimer); - (window as any)._debrisSearchTimer = setTimeout(() => { + clearTimeout((window as unknown as { _debrisSearchTimer: ReturnType })._debrisSearchTimer); + (window as unknown as { _debrisSearchTimer: ReturnType })._debrisSearchTimer = setTimeout(() => { setDebounced(val); setPage(1); }, 400); diff --git a/frontend/src/pages/DevelopersPage.tsx b/frontend/src/pages/DevelopersPage.tsx index 790b92f..a10d863 100644 --- a/frontend/src/pages/DevelopersPage.tsx +++ b/frontend/src/pages/DevelopersPage.tsx @@ -184,8 +184,6 @@ function DevelopersHero() { } function ApiSection() { - const reduce = useReducedMotion(); - return (
@@ -247,8 +245,6 @@ function ApiSection() { } function SdksSection() { - const reduce = useReducedMotion(); - return (
@@ -317,8 +313,6 @@ function SdksSection() { } function ContributorsSection() { - const reduce = useReducedMotion(); - return (
@@ -403,8 +397,6 @@ function ContributorsSection() { } function ContributeSection() { - const reduce = useReducedMotion(); - const steps = [ { icon: "fork_right", title: "Fork the Repo", description: "Clone the repository and set up your local development environment." }, { icon: "code", title: "Pick an Issue", description: "Browse open issues and find one that matches your skills and interests." }, diff --git a/frontend/src/pages/DocsPage.tsx b/frontend/src/pages/DocsPage.tsx index acca8c3..2ebb5be 100644 --- a/frontend/src/pages/DocsPage.tsx +++ b/frontend/src/pages/DocsPage.tsx @@ -24,7 +24,7 @@ const fadeUp = { show: (i: number) => ({ opacity: 1, y: 0, - transition: { duration: 0.5, delay: i * 0.07, ease: [0.16, 1, 0.3, 1] }, + transition: { duration: 0.5, delay: i * 0.07, ease: [0.16, 1, 0.3, 1] as [number, number, number, number] }, }), }; diff --git a/frontend/src/pages/LandingPage.tsx b/frontend/src/pages/LandingPage.tsx index d83807b..ab9cc9e 100644 --- a/frontend/src/pages/LandingPage.tsx +++ b/frontend/src/pages/LandingPage.tsx @@ -1,78 +1,5 @@ import Hero from "@/components/Hero"; -import React, { useEffect, useState } from "react"; -import { useNavigate } from "react-router-dom"; - - -interface OrbitalFieldProps { - prefersReducedMotion: boolean; -} - -function OrbitalField({ prefersReducedMotion }: OrbitalFieldProps) { - const orbits = [ - { rx: 260, ry: 90, rotate: -18, dur: 34, dot: "#4FE0C8", label: "SAT-2291" }, - { rx: 340, ry: 130, rotate: 8, dur: 46, dot: "#4FE0C8", label: "SAT-0417" }, - { rx: 180, ry: 60, rotate: 22, dur: 22, dot: "#FFB020", label: "CONJ-88" }, - { rx: 400, ry: 160, rotate: -6, dur: 58, dot: "#4FE0C8", label: "SAT-3355" }, - ]; - - return ( - - ); -} - -/* Hero */ - -interface HeroProps { - onLaunchDashboard: () => void; - prefersReducedMotion: boolean; -} +import React from "react"; /* How it works */ @@ -141,21 +68,6 @@ function HowItWorks() { /* Page */ export const LandingPage: React.FC = () => { - const navigate = useNavigate(); - const [prefersReducedMotion, setPrefersReducedMotion] = useState(false); - - useEffect(() => { - const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)"); - setPrefersReducedMotion(mediaQuery.matches); - const listener = (e: MediaQueryListEvent) => setPrefersReducedMotion(e.matches); - mediaQuery.addEventListener("change", listener); - return () => mediaQuery.removeEventListener("change", listener); - }, []); - - const handleLaunch = () => { - navigate("/dashboard"); - }; - return (
diff --git a/frontend/src/pages/NotFound.tsx b/frontend/src/pages/NotFound.tsx index bd8127d..1e6b53c 100644 --- a/frontend/src/pages/NotFound.tsx +++ b/frontend/src/pages/NotFound.tsx @@ -67,6 +67,7 @@ export const NotFound: React.FC = () => { useEffect(() => { const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)"); + // eslint-disable-next-line react-hooks/set-state-in-effect setPrefersReducedMotion(mediaQuery.matches); const listener = (e: MediaQueryListEvent) => setPrefersReducedMotion(e.matches); mediaQuery.addEventListener("change", listener); diff --git a/frontend/src/pages/ProductPage.tsx b/frontend/src/pages/ProductPage.tsx index b10aa1a..2453b62 100644 --- a/frontend/src/pages/ProductPage.tsx +++ b/frontend/src/pages/ProductPage.tsx @@ -191,8 +191,7 @@ function ProductHero() { ); } -function FeatureCard({ feature, index }: { feature: Feature; index: number }) { - const reduce = useReducedMotion(); +function FeatureCard({ feature }: { feature: Feature }) { return (
- {features.map((feature, i) => ( - + {features.map((feature) => ( + ))}
@@ -273,8 +272,6 @@ function FeaturesSection() { } function ArchitectureSection() { - const reduce = useReducedMotion(); - const layers = [ { title: "Data Ingestion", @@ -366,8 +363,6 @@ function ArchitectureSection() { } function PricingSection() { - const reduce = useReducedMotion(); - return (
diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 1ce91d2..59fbbfc 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { MaterialIcon } from '@/components/MaterialIcon'; export const Settings: React.FC = () => { return ( diff --git a/frontend/src/pages/SolutionsPage.tsx b/frontend/src/pages/SolutionsPage.tsx index 4e0d0e7..0502dc9 100644 --- a/frontend/src/pages/SolutionsPage.tsx +++ b/frontend/src/pages/SolutionsPage.tsx @@ -25,7 +25,7 @@ const fadeUp = { show: (i: number) => ({ opacity: 1, y: 0, - transition: { duration: 0.55, delay: i * 0.08, ease: [0.16, 1, 0.3, 1] }, + transition: { duration: 0.55, delay: i * 0.08, ease: [0.16, 1, 0.3, 1] as [number, number, number, number] }, }), }; diff --git a/frontend/src/services/api.ts b/frontend/src/services/api.ts index c7a9a9d..c850cbc 100644 --- a/frontend/src/services/api.ts +++ b/frontend/src/services/api.ts @@ -181,6 +181,7 @@ export const api = { apiFetch<{ synced_at: string }>('/weather/sync', { method: 'POST' }), triggerCollisionEvaluation: () => + // eslint-disable-next-line @typescript-eslint/no-explicit-any apiFetch('/collisions/evaluate', { method: 'POST' }), };