From e15b8ecd58e4a09d91caf42d02f4751486ea98ca Mon Sep 17 00:00:00 2001 From: matteoscrugli Date: Sun, 21 Dec 2025 23:10:53 +0100 Subject: [PATCH] Fix TypeScript error in SwipeTabs TouchList type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use React.TouchList and React.Touch types instead of native DOM types to resolve type compatibility issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- frontend/src/components/SwipeTabs.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/SwipeTabs.tsx b/frontend/src/components/SwipeTabs.tsx index bb3e46e..10ceffd 100644 --- a/frontend/src/components/SwipeTabs.tsx +++ b/frontend/src/components/SwipeTabs.tsx @@ -28,10 +28,10 @@ const EDGE_RESISTANCE = 0.35; const DEFAULT_THRESHOLD = 0.2; const DEFAULT_RENDER_WINDOW = 1; -const findTouchById = (touches: TouchList, id: number) => { +const findTouchById = (touches: React.TouchList, id: number): React.Touch | null => { for (let i = 0; i < touches.length; i += 1) { - const touch = touches[i]; - if (touch.identifier === id) { + const touch = touches.item(i); + if (touch && touch.identifier === id) { return touch; } }