Skip to content

Commit

Permalink
🌈 Design: 주석 및 μž‘μ€ λ§ˆν¬μ—… λ³€κ²½ (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoRaang committed Dec 5, 2024
1 parent 447ecf3 commit 462e8f4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/images/logo.png" />
<!-- λ‚˜μ€‘μ— 둜고 λ§Œλ“€λ©΄ νŒŒλΉ„μ½˜λ„ λ³€κ²½ν•΄μ•Ό 함 -->
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no"
Expand Down
27 changes: 27 additions & 0 deletions src/components/MallangMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import MarkerCategory from './layout/MarkerCategory';
import getLatestLocation from '../utils/getLatestLocation';
import ToolTip from './common/ToolTip';
import Remix from './common/Remix';
import axios from 'axios';

const MallangMap = () => {
const [currentLocation, setLocation] = useState({ lat: 0, lng: 0 });
Expand All @@ -14,6 +15,32 @@ const MallangMap = () => {
const [toolTipLabel, setTooltipLabel] =
useState('이 μœ„μΉ˜μ— κΈ€νƒ€λž˜ μž‘μ„±ν•˜κΈ°');

const getMarkers = async (areaCoords, articleType) => {
// articleType => [null, 'place', 'lost', 'rescue', 'user']

try {
const response = await axios.get({
url:
import.meta.env.VITE_API_BASE_URL +
'/articles/public/articlesMarkers',
responseType: 'json',
headers: {},
data: {
northEastLat: 0,
northEastLon: 0, // Longitude λ‹¨μΆ•μ–΄λ‘œ lng μ“°λŠ”λ° 이것도 지 μ’ƒλŒ€λ‘œ 해놨넀 μ‹œλ°œ
southWestLat: 0,
southEastLon: 0,
},
});

return response.data;
} catch (error) {
console.log(error);
}
};

console.log(getMarkers());

const handleCategoryChange = (data) => {
setCategory(data);

Expand Down

0 comments on commit 462e8f4

Please sign in to comment.