Showing
4 changed files
with
4 additions
and
8 deletions
... | @@ -19,7 +19,7 @@ const NavBar = (props) => { | ... | @@ -19,7 +19,7 @@ const NavBar = (props) => { |
19 | <Navbar style={{'backgroundColor': '#940f0f', 'display':'block'}} light expand="md" fixed="top"> | 19 | <Navbar style={{'backgroundColor': '#940f0f', 'display':'block'}} light expand="md" fixed="top"> |
20 | <Container className="themed-container"> | 20 | <Container className="themed-container"> |
21 | <span> | 21 | <span> |
22 | - <a href='/'><img src="logo.png" width="50" /></a> | 22 | + <a href='/'><img src="logo.png" alt="logo" width="50" /></a> |
23 | </span> | 23 | </span> |
24 | <NavbarBrand href="/" style={{'marginLeft':'1.5rem', 'color':'#fff'}}>MEALKHU</NavbarBrand> | 24 | <NavbarBrand href="/" style={{'marginLeft':'1.5rem', 'color':'#fff'}}>MEALKHU</NavbarBrand> |
25 | <NavbarToggler onClick={toggle} /> | 25 | <NavbarToggler onClick={toggle} /> |
... | @@ -35,7 +35,7 @@ const NavBar = (props) => { | ... | @@ -35,7 +35,7 @@ const NavBar = (props) => { |
35 | <NavLink href="/mypick" style={{'color':'#fff'}}>MyPick</NavLink> | 35 | <NavLink href="/mypick" style={{'color':'#fff'}}>MyPick</NavLink> |
36 | </NavItem> | 36 | </NavItem> |
37 | </Nav> | 37 | </Nav> |
38 | - <NavbarText><a href="http://khuhub.khu.ac.kr/2019102227/TermProject" target="_blank" rel="noopener" style={{'color':'#fff', 'textDecoration':'none'}}>OSS Project</a></NavbarText> | 38 | + <NavbarText><a href="http://khuhub.khu.ac.kr/2019102227/TermProject" target="_blank" rel="noopener noreferrer" style={{'color':'#fff', 'textDecoration':'none'}}>OSS Project</a></NavbarText> |
39 | </Collapse> | 39 | </Collapse> |
40 | </Container> | 40 | </Container> |
41 | </Navbar> | 41 | </Navbar> | ... | ... |
... | @@ -41,7 +41,7 @@ const MealCard = (props) => { | ... | @@ -41,7 +41,7 @@ const MealCard = (props) => { |
41 | }).then(response => response.json()) | 41 | }).then(response => response.json()) |
42 | .then(result => { | 42 | .then(result => { |
43 | if(result.message === 'delete success') { | 43 | if(result.message === 'delete success') { |
44 | - alert('delete success'); | 44 | + alert('삭제 완료'); |
45 | window.location.href = "/mypick"; | 45 | window.location.href = "/mypick"; |
46 | } else if(result.message === 'delete error') { | 46 | } else if(result.message === 'delete error') { |
47 | alert('delete error'); | 47 | alert('delete error'); | ... | ... |
... | @@ -11,7 +11,6 @@ const LandingPage = (props) => { | ... | @@ -11,7 +11,6 @@ const LandingPage = (props) => { |
11 | const [datas, setDatas] = useState([]); | 11 | const [datas, setDatas] = useState([]); |
12 | const [filteredDatas, setFilteredDatas] = useState([]); | 12 | const [filteredDatas, setFilteredDatas] = useState([]); |
13 | const [RandomCards, setRandomCards] = useState([]); | 13 | const [RandomCards, setRandomCards] = useState([]); |
14 | - const [isLoading, setIsLoading] = useState(false); | ||
15 | const [all, setAll] = useState(false); | 14 | const [all, setAll] = useState(false); |
16 | const [Kfood, setKfood] = useState(false); | 15 | const [Kfood, setKfood] = useState(false); |
17 | const [Cfood, setCfood] = useState(false); | 16 | const [Cfood, setCfood] = useState(false); |
... | @@ -28,16 +27,13 @@ const LandingPage = (props) => { | ... | @@ -28,16 +27,13 @@ const LandingPage = (props) => { |
28 | const fetchData = async () => { | 27 | const fetchData = async () => { |
29 | const result = await axios( | 28 | const result = await axios( |
30 | '/api/datas', | 29 | '/api/datas', |
31 | - // localhost로 바꾸기 | ||
32 | ); | 30 | ); |
33 | setDatas(result.data); | 31 | setDatas(result.data); |
34 | - setIsLoading(true); | ||
35 | }; | 32 | }; |
36 | fetchData(); | 33 | fetchData(); |
37 | }, []); | 34 | }, []); |
38 | 35 | ||
39 | useEffect(() => { | 36 | useEffect(() => { |
40 | - setIsLoading(false); | ||
41 | let result = []; | 37 | let result = []; |
42 | const states = [Kfood, Cfood, Jfood, meat, snackfood, pub, fastfood, cafe, etc]; | 38 | const states = [Kfood, Cfood, Jfood, meat, snackfood, pub, fastfood, cafe, etc]; |
43 | const types = [['한식'], ['중식'], ['일식'], ['고기'], ['분식'], ['호프', '술집'], ['패스트푸드'], ['카페', '디저트'], ['기타']]; | 39 | const types = [['한식'], ['중식'], ['일식'], ['고기'], ['분식'], ['호프', '술집'], ['패스트푸드'], ['카페', '디저트'], ['기타']]; |
... | @@ -54,7 +50,6 @@ const LandingPage = (props) => { | ... | @@ -54,7 +50,6 @@ const LandingPage = (props) => { |
54 | } | 50 | } |
55 | } | 51 | } |
56 | setFilteredDatas(result); | 52 | setFilteredDatas(result); |
57 | - setIsLoading(true); | ||
58 | }, [Kfood, Cfood, Jfood, meat, snackfood, pub, fastfood, cafe, etc, datas]); | 53 | }, [Kfood, Cfood, Jfood, meat, snackfood, pub, fastfood, cafe, etc, datas]); |
59 | 54 | ||
60 | useEffect(() => { | 55 | useEffect(() => { | ... | ... |
... | @@ -179,6 +179,7 @@ app.get("/api/mypicks", (req, res) => { | ... | @@ -179,6 +179,7 @@ app.get("/api/mypicks", (req, res) => { |
179 | let temp = iconv.decode(dataBuffer, "EUC-KR"); | 179 | let temp = iconv.decode(dataBuffer, "EUC-KR"); |
180 | 180 | ||
181 | connection.query(`SELECT pick FROM USER WHERE NAME='${username}';`, (err, rows, fileds) => { | 181 | connection.query(`SELECT pick FROM USER WHERE NAME='${username}';`, (err, rows, fileds) => { |
182 | + | ||
182 | let user_picks = rows[0].pick.split(','); | 183 | let user_picks = rows[0].pick.split(','); |
183 | temp = JSON.parse(temp); | 184 | temp = JSON.parse(temp); |
184 | user_picks.pop(); | 185 | user_picks.pop(); | ... | ... |
-
Please register or login to post a comment