fix: import React types correctly in useArticleLoader

- Import Dispatch and SetStateAction directly from 'react'
- Fixes linting errors about React not being defined
- Resolves eslint no-undef errors
This commit is contained in:
Gigi
2025-10-20 13:34:48 +02:00
parent 73470987be
commit e50af42c96

View File

@@ -1,4 +1,4 @@
import { useEffect } from 'react' import { useEffect, Dispatch, SetStateAction } from 'react'
import { RelayPool } from 'applesauce-relay' import { RelayPool } from 'applesauce-relay'
import { fetchArticleByNaddr } from '../services/articleService' import { fetchArticleByNaddr } from '../services/articleService'
import { fetchHighlightsForArticle } from '../services/highlightService' import { fetchHighlightsForArticle } from '../services/highlightService'
@@ -14,7 +14,7 @@ interface UseArticleLoaderProps {
setReaderContent: (content: ReadableContent | undefined) => void setReaderContent: (content: ReadableContent | undefined) => void
setReaderLoading: (loading: boolean) => void setReaderLoading: (loading: boolean) => void
setIsCollapsed: (collapsed: boolean) => void setIsCollapsed: (collapsed: boolean) => void
setHighlights: React.Dispatch<React.SetStateAction<Highlight[]>> setHighlights: Dispatch<SetStateAction<Highlight[]>>
setHighlightsLoading: (loading: boolean) => void setHighlightsLoading: (loading: boolean) => void
setCurrentArticleCoordinate: (coord: string | undefined) => void setCurrentArticleCoordinate: (coord: string | undefined) => void
setCurrentArticleEventId: (id: string | undefined) => void setCurrentArticleEventId: (id: string | undefined) => void