1
- import React , { useState } from "react" ;
1
+ import React from "react" ;
2
2
// import camp_introduction_img from "../image/draw_icon/camp_introduction.png";
3
3
// import registration_information_img from "../image/draw_icon/registration_information.png";
4
4
// import faq_img from "../image/draw_icon/faq.png";
@@ -12,16 +12,16 @@ import Traffic from "./Traffic";
12
12
import Review from "./Review" ;
13
13
14
14
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
+ // });
22
23
23
- {
24
- /*
24
+ /*
25
25
const toggleDescription = (imageId) => {
26
26
setDescriptions((prevState) => ({
27
27
...prevState,
@@ -32,7 +32,6 @@ const Home = () => {
32
32
}));
33
33
};
34
34
*/
35
- }
36
35
37
36
return (
38
37
< div id = "main" style = { { margin : "64px 0%" } } >
@@ -91,7 +90,7 @@ const Home = () => {
91
90
wordWrap : "break-word" ,
92
91
} }
93
92
>
94
- { descriptions [ `image ${ index } ` ] . content }
93
+ { pages [ index - 1 ] }
95
94
</ div >
96
95
</ li >
97
96
) ) }
0 commit comments