fix: resize feed column width
Signed-off-by: Innei <i@innei.in>
This commit is contained in:
parent
26e4f3d474
commit
5701124306
|
|
@ -97,7 +97,14 @@ export function FeedColumn({ children }: PropsWithChildren) {
|
|||
}, [setActive_])
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const handler = () => {
|
||||
spring.jump(-active * jotaiStore.get(carouselWidthAtom))
|
||||
}
|
||||
const dispose = jotaiStore.sub(carouselWidthAtom, handler)
|
||||
spring.set(-active * jotaiStore.get(carouselWidthAtom))
|
||||
return () => {
|
||||
dispose()
|
||||
}
|
||||
}, [active, spring])
|
||||
|
||||
useHotkeys(
|
||||
|
|
|
|||
Loading…
Reference in New Issue