diff --git a/src/components/TaskGame/components/Destructuring.js b/src/components/TaskGame/components/Destructuring.js
index 2327ea0..d8a251a 100644
--- a/src/components/TaskGame/components/Destructuring.js
+++ b/src/components/TaskGame/components/Destructuring.js
@@ -12,9 +12,10 @@ function Destructuring(props) {
};
// TODO: Find the Bugs
- var color1 = colors.color1,
- color2 = colors.color1,
- color3 = colors.color1;
+ // var color1 = colors.color1,
+ // color2 = colors.color2,
+ // color3 = colors.color3;
+var { color1, color2, color3 } = colors
return (
diff --git a/src/components/TaskGame/components/Fetching.js b/src/components/TaskGame/components/Fetching.js
index d9994f3..2f54f46 100644
--- a/src/components/TaskGame/components/Fetching.js
+++ b/src/components/TaskGame/components/Fetching.js
@@ -19,8 +19,7 @@ function Fetching(props) {
// TODO: Find the Bugs
// setPokemonList will broken the page
- // setPokemonList(pokemonList);
- console.log(pokemonList);
+ setPokemonList(pokemonList.results);
});
}, []);
diff --git a/src/components/TaskGame/components/Props.js b/src/components/TaskGame/components/Props.js
index 48ddb6c..e7876f2 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..382367c 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..63f40a6 100644
--- a/src/components/TaskGame/components/UseStateClosure.js
+++ b/src/components/TaskGame/components/UseStateClosure.js
@@ -12,7 +12,7 @@ function UseStateClosure(props) {
console.log("handlernya sudah onclick");
setTimeout(() => {
// TODO: Find the Bugs
- setCount(count + 1);
+ setCount(count => count + 1);
}, 1000);
};