From dbc74b90602135799f047339c6e91a16ff5efe6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Tue, 4 Oct 2022 14:00:21 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=A0=EC=94=A8=EA=B2=80=EC=83=89=20-=20styl?= =?UTF-8?q?e=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/weather/WeatherView.js | 36 ++++++++++++++------------------ 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/views/weather/WeatherView.js b/src/views/weather/WeatherView.js index 2220598..72d2a1d 100644 --- a/src/views/weather/WeatherView.js +++ b/src/views/weather/WeatherView.js @@ -1,19 +1,17 @@ import { WINDY_KEY } from '../../configs/constants'; import React, { useEffect, useState } from 'react'; -import { Search } from 'react-feather' -import { Card, CardBody, Button, Input, Row, Col, InputGroup, InputGroupAddon, InputGroupText, FormGroup } from 'reactstrap'; +import { Search } from 'react-feather'; +import '../../assets/css/custom.css'; +import { Input, InputGroup, InputGroupAddon, InputGroupText } from 'reactstrap'; import { useDispatch, useSelector } from 'react-redux'; import { flightPlanAPI } from '../../modules/basis/flight/apis/basisFlightApi'; - const WeatherView = () => { - const [query, setQuery] = useState(''); const [searchRes, setSearchRes] = useState([]); const [isSearch, setIsSearch] = useState(false); const dispatch = useDispatch(); const [map, setMap] = useState(); - const options = { // Required: API key @@ -24,7 +22,6 @@ const WeatherView = () => { // Optional: Initial state of the map }; - const handleSearch = async () => { const res = await flightPlanAPI.searchArea({ query: query }); setIsSearch(true); @@ -39,19 +36,20 @@ const WeatherView = () => { } }; const handleCoord = (mapx, mapy) => { - let utmk = naver.maps.TransCoord.fromTM128ToUTMK(naver.maps.Point(mapx, mapy)); + let utmk = naver.maps.TransCoord.fromTM128ToUTMK( + naver.maps.Point(mapx, mapy) + ); let latlng = naver.maps.TransCoord.fromUTMKToLatLng(utmk); setIsSearch(false); - + setMap(latlng); let options = { duration: 800, easing: 'easeOutCubic' - } + }; // map.morph(latlng, 16, options) console.log(map); - - } + }; const handleEnter = e => { if (e.key == 'Enter') { handleSearch(); @@ -59,7 +57,7 @@ const WeatherView = () => { }; return ( <> -
+
@@ -98,7 +96,6 @@ const WeatherView = () => {
- {/* {prev.address} */} {prev.roadAddress}
@@ -113,18 +110,17 @@ const WeatherView = () => {
- {!map ? - + {!map ? (