Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/TaskGame/components/Destructuring.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TaskGame/components/Fetching.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Fetching(props) {

// TODO: Find the Bugs
// setPokemonList will broken the page
// setPokemonList(pokemonList);
setPokemonList(pokemonList.results);
console.log(pokemonList);
});
}, []);
Expand Down
4 changes: 2 additions & 2 deletions src/components/TaskGame/components/Props.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function Props(props) {
</Col>
<Col span={4}>
{/* TODO: Find the Bugs */}
<Square />
<Square backgroundColor={color2}/>
</Col>
<Col span={4}>
{/* TODO: Find the Bugs */}
<Square />
<Square backgroundColor={color3}/>
</Col>
</Row>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TaskGame/components/UseEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function UseEffect(props) {
// TODO: Find the Bugs
useEffect(() => {
setCount(Math.random);
});
},[]);

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TaskGame/components/UseState.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions src/components/TaskGame/components/UseStateClosure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down