diff --git a/frontend/src/components/KLineChart.tsx b/frontend/src/components/KLineChart.tsx index 83b0315..7516014 100644 --- a/frontend/src/components/KLineChart.tsx +++ b/frontend/src/components/KLineChart.tsx @@ -12,7 +12,7 @@ interface Props { export default function KLineChart({ kline, realtime, addedDate, stockCode, stockName }: Props) { const chartRef = useRef(null) - const instance = useRef() + const instance = useRef(null) useEffect(() => { if (!chartRef.current) return diff --git a/frontend/src/components/SearchBar.tsx b/frontend/src/components/SearchBar.tsx index 32fd219..ea29ebc 100644 --- a/frontend/src/components/SearchBar.tsx +++ b/frontend/src/components/SearchBar.tsx @@ -10,7 +10,7 @@ export default function SearchBar({ onSelect }: Props) { const [query, setQuery] = useState('') const [results, setResults] = useState([]) const [open, setOpen] = useState(false) - const timer = useRef>() + const timer = useRef | undefined>(undefined) const ref = useRef(null) useEffect(() => { diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index cfa507e..d128e1f 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -29,18 +29,6 @@ export default function HomePage() { window.location.reload() } - const handleAddToExisting = async (colId: number) => { - if (!pendingStock) return - await addStock(colId, { - code: pendingStock.code, - name: pendingStock.name, - added_date: addedDate, - }) - setShowModal(false) - setPendingStock(null) - window.location.reload() - } - return (

A股追踪