sdy

remove unnecessary codes

...@@ -31,9 +31,6 @@ function App() { ...@@ -31,9 +31,6 @@ function App() {
31 31
32 if (result !== null || result !== undefined || result.length !== 0) { 32 if (result !== null || result !== undefined || result.length !== 0) {
33 setAnswer(result.hits.hits); 33 setAnswer(result.hits.hits);
34 - answer.forEach(e => {
35 - console.log(e._source.정답);
36 - });
37 } 34 }
38 } catch (error) { 35 } catch (error) {
39 console.log(error); 36 console.log(error);
...@@ -45,7 +42,7 @@ function App() { ...@@ -45,7 +42,7 @@ function App() {
45 const showAnswer = (answer) => { 42 const showAnswer = (answer) => {
46 return ( 43 return (
47 <div> 44 <div>
48 - <b>{answer._source.정답}</b> 45 + <b>{answer !== undefined ? answer._source.정답 : 'loading ....'}</b>
49 </div> 46 </div>
50 ) 47 )
51 } 48 }
......