diff --git a/src/components/TaskGame/components/Destructuring.js b/src/components/TaskGame/components/Destructuring.js index 2327ea0..5536e31 100644 --- a/src/components/TaskGame/components/Destructuring.js +++ b/src/components/TaskGame/components/Destructuring.js @@ -13,8 +13,8 @@ function Destructuring(props) { // TODO: Find the Bugs var color1 = colors.color1, - color2 = colors.color1, - color3 = colors.color1; + color2 = colors.color2, + color3 = colors.color3; return (
diff --git a/src/components/TaskGame/components/Fetching.js b/src/components/TaskGame/components/Fetching.js index d9994f3..2ec83fc 100644 --- a/src/components/TaskGame/components/Fetching.js +++ b/src/components/TaskGame/components/Fetching.js @@ -19,7 +19,7 @@ function Fetching(props) { // TODO: Find the Bugs // setPokemonList will broken the page - // setPokemonList(pokemonList); + setPokemonList(pokemonList.results); console.log(pokemonList); }); }, []); diff --git a/src/components/TaskGame/components/Props.js b/src/components/TaskGame/components/Props.js index 48ddb6c..a05f7bc 100644 --- a/src/components/TaskGame/components/Props.js +++ b/src/components/TaskGame/components/Props.js @@ -24,11 +24,11 @@ function Props(props) { {/* TODO: Find the Bugs */} - + {/* TODO: Find the Bugs */} - +
diff --git a/src/components/TaskGame/components/UseEffect.js b/src/components/TaskGame/components/UseEffect.js index 6ad8146..9e5041f 100644 --- a/src/components/TaskGame/components/UseEffect.js +++ b/src/components/TaskGame/components/UseEffect.js @@ -11,7 +11,7 @@ function UseEffect(props) { // TODO: Find the Bugs useEffect(() => { setCount(Math.random); - }); + },[]); return (
diff --git a/src/components/TaskGame/components/UseState.js b/src/components/TaskGame/components/UseState.js index 8c5590e..51db1ba 100644 --- a/src/components/TaskGame/components/UseState.js +++ b/src/components/TaskGame/components/UseState.js @@ -3,7 +3,7 @@ import { Button, Divider } from "antd"; function UseState(props) { const handleNext = () => { // TODO: Find the Bugs - props.setStep(1); + props.setStep(3); }; return ( diff --git a/src/components/TaskGame/components/UseStateClosure.js b/src/components/TaskGame/components/UseStateClosure.js index f6230ed..9d022c9 100644 --- a/src/components/TaskGame/components/UseStateClosure.js +++ b/src/components/TaskGame/components/UseStateClosure.js @@ -12,8 +12,8 @@ function UseStateClosure(props) { console.log("handlernya sudah onclick"); setTimeout(() => { // TODO: Find the Bugs - setCount(count + 1); - }, 1000); + setCount(count => count + 1); + }, 1); }; return (