fix: search bar crash as new source added

This commit is contained in:
Ou
2024-11-22 00:48:03 +08:00
parent fb1fe98866
commit bf07610c43
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -95,9 +95,6 @@ function DndWrapper({ items, setItems, children }: PropsWithChildren<{
wait: AnimationDuration,
})
const { el } = useAtomValue(goToTopAtom)
useEffect(() => {
console.log(el)
}, [el])
return (
<DndContext onDropTargetChange={run} autoscroll={el ? { element: el } : undefined}>
{children}
+1 -1
View File
@@ -47,7 +47,7 @@ export function SearchBar() {
title: source.title,
column: source.column ? columns[source.column].zh : "未分类",
name: source.name,
pinyin: pinyin?.[k as keyof typeof pinyin],
pinyin: pinyin?.[k as keyof typeof pinyin] ?? "",
})))
, [],
)