mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix: multiple automatic changes of index column
This commit is contained in:
parent
552b75d9d1
commit
b2fb996a37
@ -8,5 +8,7 @@ export const Route = createFileRoute("/")({
|
||||
|
||||
function IndexComponent() {
|
||||
const focusSources = useAtomValue(focusSourcesAtom)
|
||||
return <Column id={focusSources.length ? "focus" : "hottest"} />
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
const id = useMemo(() => focusSources.length ? "focus" : "hottest", [])
|
||||
return <Column id={id} />
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user