fix: multiple automatic changes of index column
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user