Skip to content

Commit 8d88823

Browse files
committed
Fix build err
1 parent 82b8a98 commit 8d88823

File tree

2 files changed

+12
-29
lines changed

2 files changed

+12
-29
lines changed

my-app/src/page/About.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
import React from "react";
2-
import styled from "styled-components";
3-
const Lesson = styled.section`
4-
display: flex;
5-
flex-direction: column;
6-
justify-content: center;
7-
align-items: center;
8-
div {
9-
div.title {
10-
display: flex;
11-
justify-content: flex-start;
12-
align-items: center;
13-
img {
14-
align-self: flex-end;
15-
}
16-
}
17-
}
18-
`;
2+
193
const About = () => {
204
return (
215
<div>

my-app/src/page/Home.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React from "react";
22
// import camp_introduction_img from "../image/draw_icon/camp_introduction.png";
33
// import registration_information_img from "../image/draw_icon/registration_information.png";
44
// import faq_img from "../image/draw_icon/faq.png";
@@ -12,16 +12,16 @@ import Traffic from "./Traffic";
1212
import Review from "./Review";
1313

1414
const Home = () => {
15-
const [descriptions, setDescriptions] = useState({
16-
image1: { visible: true, content: <About /> },
17-
image2: { visible: true, content: <Info /> },
18-
image3: { visible: true, content: <FAQ /> },
19-
image4: { visible: true, content: <Traffic /> },
20-
image5: { visible: true, content: <Review /> },
21-
});
15+
const pages = [<About />, <Info />, <FAQ />, <Traffic />, <Review />];
16+
// const [descriptions, setDescriptions] = useState({
17+
// image1: { visible: true, content: <About /> },
18+
// image2: { visible: true, content: <Info /> },
19+
// image3: { visible: true, content: <FAQ /> },
20+
// image4: { visible: true, content: <Traffic /> },
21+
// image5: { visible: true, content: <Review /> },
22+
// });
2223

23-
{
24-
/*
24+
/*
2525
const toggleDescription = (imageId) => {
2626
setDescriptions((prevState) => ({
2727
...prevState,
@@ -32,7 +32,6 @@ const Home = () => {
3232
}));
3333
};
3434
*/
35-
}
3635

3736
return (
3837
<div id="main" style={{ margin: "64px 0%" }}>
@@ -91,7 +90,7 @@ const Home = () => {
9190
wordWrap: "break-word",
9291
}}
9392
>
94-
{descriptions[`image${index}`].content}
93+
{pages[index - 1]}
9594
</div>
9695
</li>
9796
))}

0 commit comments

Comments
 (0)