Commit 3934b56f authored by Chunchi Che's avatar Chunchi Che

fix hand spring

parent 4b8c5cff
Pipeline #18982 passed with stages
in 3 minutes and 53 seconds
...@@ -55,10 +55,9 @@ const CHand = (props: { ...@@ -55,10 +55,9 @@ const CHand = (props: {
const planeRef = useRef(null); const planeRef = useRef(null);
const state = props.state; const state = props.state;
const [hovered, setHovered] = useState(false); const [hovered, setHovered] = useState(false);
const position = props.position;
const dispatch = store.dispatch; const dispatch = store.dispatch;
const [position, setPosition] = useState(props.position);
const [spring, api] = useSpring( const [spring, api] = useSpring(
() => ({ () => ({
from: { from: {
...@@ -81,8 +80,6 @@ const CHand = (props: { ...@@ -81,8 +80,6 @@ const CHand = (props: {
api.start({ api.start({
position, position,
}); });
setPosition(position);
}, [position]); }, [position]);
useHover( useHover(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment