import './App.css';
import { Route,Routes,Link,useNavigate } from 'react-router-dom';
//js에서 이미지를 불러올수있는 함수를 만들어 모듈화 해줌 import함
import { getEmotionImage } from './util/get-emotion-image';
...
return (
<>
//img태그에 src에 함수를 호출해
<div>
<div style="display: flex; justify-content: center;">
<img src={getEmotionImage(1)}/ style="width:auto; height:auto;">
</div>
<div style="display: flex; justify-content: center;">
<img src={getEmotionImage(2)}/ style="width:auto; height:auto;">
</div>
<div style="display: flex; justify-content: center;">
<img src={getEmotionImage(3)}/ style="width:auto; height:auto;">
</div>
<div style="display: flex; justify-content: center;">
<img src={getEmotionImage(4)}/ style="width:auto; height:auto;">
</div>
<div style="display: flex; justify-content: center;">
<img src={getEmotionImage(5)}/ style="width:auto; height:auto;">
</div>
</div>
...
<Routes>
<Route path="/" element={<Home />} />
<Route path="/new" element={<New />} />
<Route path="/diary/:id" element={<Diary />} />
<Route path="*" element={<NotFound />} />
</Routes>
</>
)
}
export default App