diff --git a/squarenotsquare/src/components/Fade.js b/squarenotsquare/src/components/Fade.js index 06fcde9..1b3fe46 100644 --- a/squarenotsquare/src/components/Fade.js +++ b/squarenotsquare/src/components/Fade.js @@ -4,14 +4,13 @@ import { useEffect, useRef } from "react"; function Fade(props){ const faded = useRef(new Animated.Value(0.1)); - const opaque = useRef(new Animated.Value(1)); useEffect(() => { if (props.faded) { Animated.timing( - opaque.current, + faded.current, { - toValue: 0.25, + toValue: 0.1, duration: props.duration, useNativeDriver: true } @@ -30,7 +29,7 @@ function Fade(props){ return ( - + {props.children} ) diff --git a/squarenotsquare/src/screens/Game.js b/squarenotsquare/src/screens/Game.js index 865e34d..052f011 100644 --- a/squarenotsquare/src/screens/Game.js +++ b/squarenotsquare/src/screens/Game.js @@ -139,7 +139,7 @@ function Game(props){ function generatePair(answer, shapeIndex, pairIndex) { if (answer === 0) { return ( - + {generateSquare(pairIndex)} {generateShape(shapeIndex, pairIndex)} @@ -148,7 +148,7 @@ function Game(props){ ); } else { return ( - + {generateShape(shapeIndex, pairIndex)} {generateSquare(pairIndex)}