feat(desktop): use atomWithStorage for masonry column value (#3023)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createAtomHooks } from "@follow/utils/jotai"
|
||||
import { atom } from "jotai"
|
||||
import { getStorageNS } from "@follow/utils/ns"
|
||||
import { atomWithStorage } from "jotai/utils"
|
||||
|
||||
export const [, , useMasonryColumnValue, , getMasonryColumnValue, setMasonryColumnValue] =
|
||||
createAtomHooks(atom(-1))
|
||||
createAtomHooks(atomWithStorage(getStorageNS("masonry-column"), -1))
|
||||
|
||||
Reference in New Issue
Block a user