diff --git a/src/components/TaskGame/components/Destructuring.js b/src/components/TaskGame/components/Destructuring.js
index 2327ea0..fd01c3f 100644
--- a/src/components/TaskGame/components/Destructuring.js
+++ b/src/components/TaskGame/components/Destructuring.js
@@ -11,10 +11,7 @@ function Destructuring(props) {
color3: "green",
};
- // TODO: Find the Bugs
- var color1 = colors.color1,
- color2 = colors.color1,
- color3 = colors.color1;
+ const {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..71c32ab 100644
--- a/src/components/TaskGame/components/Props.js
+++ b/src/components/TaskGame/components/Props.js
@@ -19,16 +19,13 @@ function Props(props) {
- {/* TODO: Find the Bugs */}
- {/* 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..49bf5e9 100644
--- a/src/components/TaskGame/components/UseEffect.js
+++ b/src/components/TaskGame/components/UseEffect.js
@@ -8,10 +8,9 @@ function UseEffect(props) {
const [count, setCount] = useState(0);
- // 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..e3374e1 100644
--- a/src/components/TaskGame/components/UseState.js
+++ b/src/components/TaskGame/components/UseState.js
@@ -1,9 +1,8 @@
import { Button, Divider } from "antd";
function UseState(props) {
- const handleNext = () => {
- // TODO: Find the Bugs
- props.setStep(1);
+ const handleNext = () =>{
+ props.setStep(3);
};
return (
diff --git a/src/components/TaskGame/components/UseStateClosure.js b/src/components/TaskGame/components/UseStateClosure.js
index f6230ed..d138e63 100644
--- a/src/components/TaskGame/components/UseStateClosure.js
+++ b/src/components/TaskGame/components/UseStateClosure.js
@@ -11,8 +11,7 @@ function UseStateClosure(props) {
const handleClickAsync = () => {
console.log("handlernya sudah onclick");
setTimeout(() => {
- // TODO: Find the Bugs
- setCount(count + 1);
+ setCount(count => count + 1);
}, 1000);
};
diff --git a/src/components/TaskIntro/index.js b/src/components/TaskIntro/index.js
index ba154ab..ac773cb 100644
--- a/src/components/TaskIntro/index.js
+++ b/src/components/TaskIntro/index.js
@@ -33,8 +33,6 @@ function TaskIntro() {
- {/* TODO: Find the Bugs */}
- {/* Ini seharusnya redirect ke TaskGame, tapi kok malah ke Home */}