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
5 changes: 1 addition & 4 deletions src/components/TaskGame/components/Destructuring.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div>
Expand Down
3 changes: 1 addition & 2 deletions src/components/TaskGame/components/Fetching.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ function Fetching(props) {

// TODO: Find the Bugs
// setPokemonList will broken the page
// setPokemonList(pokemonList);
console.log(pokemonList);
setPokemonList(pokemonList.results);
});
}, []);

Expand Down
7 changes: 2 additions & 5 deletions src/components/TaskGame/components/Props.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ function Props(props) {
<div>
<Row justify="space-around">
<Col span={4}>
{/* TODO: Find the Bugs */}
<Square backgroundColor={color1} />
</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
3 changes: 1 addition & 2 deletions src/components/TaskGame/components/UseEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ function UseEffect(props) {

const [count, setCount] = useState(0);

// TODO: Find the Bugs
useEffect(() => {
setCount(Math.random);
});
},[]);

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

Expand Down
2 changes: 0 additions & 2 deletions src/components/TaskIntro/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ function TaskIntro() {
<Image src="/task-intro.png" width="50%" />
</div>
<Divider />
{/* TODO: Find the Bugs */}
{/* Ini seharusnya redirect ke TaskGame, tapi kok malah ke Home */}
<Button
type={isProgress ? "dashed" : "primary"}
loading={isProgress}
Expand Down
9,783 changes: 9,783 additions & 0 deletions yarn.lock

Large diffs are not rendered by default.