This commit is contained in:
C菌
2026-07-04 01:00:59 +08:00
parent 55d088cfe0
commit 35b2e1b44d
3 changed files with 2 additions and 14 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ interface Props {
export default function KLineChart({ kline, realtime, addedDate, stockCode, stockName }: Props) {
const chartRef = useRef<HTMLDivElement>(null)
const instance = useRef<echarts.ECharts>()
const instance = useRef<echarts.ECharts>(null)
useEffect(() => {
if (!chartRef.current) return
+1 -1
View File
@@ -10,7 +10,7 @@ export default function SearchBar({ onSelect }: Props) {
const [query, setQuery] = useState('')
const [results, setResults] = useState<StockItem[]>([])
const [open, setOpen] = useState(false)
const timer = useRef<ReturnType<typeof setTimeout>>()
const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)
const ref = useRef<HTMLDivElement>(null)
useEffect(() => {
-12
View File
@@ -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 (
<div style={{ maxWidth: 800, margin: '0 auto', padding: '24px 16px' }}>
<h1 style={{ fontSize: 24, fontWeight: 700, marginBottom: 8 }}>A股追踪</h1>