Skip to content

Commit

Permalink
Change Ko to Eng
Browse files Browse the repository at this point in the history
  • Loading branch information
sehee0207 committed Feb 20, 2024
1 parent 78a7572 commit 452c69b
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 90 deletions.
Binary file modified data/docity.xlsx
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ const Header = () => {

<Link to="/reportlist">
<div className="reportlist">
<FontAwesomeIcon icon={faFile} /> 보고서
<FontAwesomeIcon icon={faFile} /> Report
</div>
</Link>

<Link to="/mypage">
<div className="my">
<FontAwesomeIcon icon={faUser} /> 마이페이지
<FontAwesomeIcon icon={faUser} /> Mypage
</div>
</Link>
</StyledHeader>
Expand Down
17 changes: 6 additions & 11 deletions src/components/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ const Map: React.FC<MapProps> = ({ lat, lng }) => {


useEffect(() => {
// 마커 클릭 이벤트를 감지합니다.
const markerClickEvent = (event: Event) => {
const customEvent = event as CustomEvent<string>; // 이벤트를 CustomEvent로 타입 캐스팅합니다.
const customEvent = event as CustomEvent<string>;
if (customEvent.detail === 'marker1' || customEvent.detail === 'marker2') {
setIsOpen(true);
}
Expand All @@ -57,26 +56,22 @@ const Map: React.FC<MapProps> = ({ lat, lng }) => {
window.initMap = () => {
const mapOptions = {
center: { lat: 37.5494, lng: 126.9712 },
zoom: 13,
zoom: 11,
};

mapObjRef.current = new window.google.maps.Map(mapRef.current!, mapOptions);
// 첫 번째 위치에 마커를 추가합니다.

const marker1 = new window.google.maps.Marker({
position: { lat: 37.5455, lng: 126.9613 },
title: "서울특별시 용산구 효창원로 177-18 <효창공원>",
title: "177-18, Hyochangwon-ro, Yongsan-gu, Seoul, Republic of Korea",
});

// 두 번째 위치에 마커를 추가합니다.
const marker2 = new window.google.maps.Marker({
position: { lat: 37.5526, lng: 126.9864 },
title: "서울특별시 중구 삼일대로 231 <남산공원>",
title: "231, Samil-daero, Jung-gu, Seoul, Republic of Korea",
});

// 마커를 참조에 저장합니다.
markersRef.current = [marker1, marker2];

// 마커들을 지도에 추가합니다.
markersRef.current.forEach(marker => marker.setMap(mapObjRef.current));

marker1.addListener("click", () => {
Expand All @@ -99,7 +94,7 @@ const Map: React.FC<MapProps> = ({ lat, lng }) => {

useEffect(() => {
if (mapObjRef.current) {
mapObjRef.current.setCenter({ lat: lat, lng: lng }); // 위도, 경도가 변경될 때마다 지도의 중심을 변경합니다.
mapObjRef.current.setCenter({ lat: lat, lng: lng });
}
}, [lat, lng]);

Expand Down
19 changes: 8 additions & 11 deletions src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const Modal = ({ title, latlng, onClick }: ModalProps) =>{
}, [latlng]);

const getWindDirection = (deg: number) => {
const directions = ['', '북동', '', '남동', '', '남서', '', '북서'];
const directions = ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'];
const value = Math.floor((deg + 22.5) / 45);
return directions[value % 8];
};
Expand All @@ -122,21 +122,18 @@ const Modal = ({ title, latlng, onClick }: ModalProps) =>{
<>
<h5>{title}</h5>
<ButtonboxStyle>
<Button text="보고서 작성하기" onClick={() => onSubmit(title)} />
<Button text="Write Report" onClick={() => onSubmit(title)} />
</ButtonboxStyle>
</>
)}



{weatherData && (
<WeatherContainerStyle>
<WeatherDivStyle>현재 온도 : {(weatherData.main.temp - 273.15).toFixed(2)} °C</WeatherDivStyle>
<WeatherDivStyle>날씨 정보 : {weatherData.weather[0].main} - {weatherData.weather[0].description}</WeatherDivStyle>
<WeatherDivStyle>습도 : {weatherData.main.humidity} %</WeatherDivStyle>
<WeatherDivStyle>풍향 : {getWindDirection(weatherData.wind.deg)}</WeatherDivStyle>
<WeatherDivStyle>풍속 : {weatherData.wind.speed} m/s</WeatherDivStyle>
<WeatherDivStyle>구름 : {weatherData.clouds.all} %</WeatherDivStyle>
<WeatherDivStyle>Current temperature : {(weatherData.main.temp - 273.15).toFixed(2)} °C</WeatherDivStyle>
<WeatherDivStyle>Weather Information : {weatherData.weather[0].main} - {weatherData.weather[0].description}</WeatherDivStyle>
<WeatherDivStyle>Humidity : {weatherData.main.humidity} %</WeatherDivStyle>
<WeatherDivStyle>Wind direction : {getWindDirection(weatherData.wind.deg)}</WeatherDivStyle>
<WeatherDivStyle>Wind Speed : {weatherData.wind.speed} m/s</WeatherDivStyle>
<WeatherDivStyle>Cloud : {weatherData.clouds.all} %</WeatherDivStyle>
</WeatherContainerStyle>
)}

Expand Down
26 changes: 13 additions & 13 deletions src/components/Selectbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ const SelectboxStyle = styled.div`
`;

const docityList: Option[] = [
{ value: 'Seoul', name: '서울특별시' },
{ value: 'Busan', name: '부산광역시' },
{ value: 'Daegu', name: '대구광역시' },
{ value: 'Incheon', name: '인천광역시' },
{ value: 'Gwangju', name: '광주광역시' },
{ value: 'Daejeon', name: '대전광역시' },
{ value: 'Ulsan', name: '울산광역시' },
{ value: 'Seoul', name: 'Seoul' },
{ value: 'Busan', name: 'Busan' },
{ value: 'Daegu', name: 'Daegu' },
{ value: 'Incheon', name: 'Incheon' },
{ value: 'Gwangju', name: 'Gwangju' },
{ value: 'Daejeon', name: 'Daejeon' },
{ value: 'Ulsan', name: 'Ulsan' },
// { value: "Sejong", name: "세종특별자치시" },
{ value: 'Gyeonggi-do', name: '경기도' },
{ value: 'Gangwon-do', name: '강원도' },
{ value: 'Chungcheong-do', name: '충청도' },
{ value: 'Jeonla-do', name: '전라도' },
{ value: 'Gyeongsang-do', name: '경상도' },
{ value: 'Jeju', name: '제주' },
{ value: 'Gyeonggi-do', name: 'Gyeonggi-do' },
{ value: 'Gangwon-do', name: 'Gangwon-do' },
{ value: 'Chungcheong-do', name: 'Chungcheong-do' },
{ value: 'Jeonla-do', name: 'Jeonla-do' },
{ value: 'Gyeongsang-do', name: 'Gyeongsang-do' },
{ value: 'Jeju', name: 'Jeju' },
];

const Selectbox: React.FC<SelectboxProps> = ({
Expand Down
6 changes: 2 additions & 4 deletions src/pages/Mainpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ const Main = () => {
<FontAwesomeIcon icon={faCircleInfo} style={{color: "#4350A7"}} size='2xl' id="iconinfo"/>

<InfoTextStyle>
{/* <FontAwesomeIcon icon={faFire} style={{color: "#4350A7"}} size='xl' id="iconfire"/>
<H4Style>클릭 시 화재 정보 확인 가능</H4Style> */}
<H4Style>지도가 제대로 로드되지 않는다면</H4Style>
<H4Style>새로고침을 진행해주세요</H4Style>
<H4Style>If the map doesn't load properly,</H4Style>
<H4Style>please refresh</H4Style>
</InfoTextStyle>
</InfoStyle>

Expand Down
12 changes: 6 additions & 6 deletions src/pages/Mypage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,33 +86,33 @@ const My = () => {
<div className="mypage">
<Header />
<ChangemypageStyle>
<h3 id="page_title">마이 페이지</h3>
<h3 id="page_title">My Information</h3>

<InputboxStyle>
<NamedivStyle>
<H5Style>이름</H5Style>
<H5Style>Name</H5Style>
<InputStyle type="text" value={data ? data.name : ''} />
</NamedivStyle>

<IDdivStyle>
<H5Style>아이디</H5Style>
<H5Style>ID</H5Style>
<InputStyle type="text" value={data ? data.userId : ''}/>
</IDdivStyle>

<BelongdivStyle>
<H5Style>소속</H5Style>
<H5Style>Department</H5Style>
<InputStyle type="text" value={data ? data.department : ''}/>
</BelongdivStyle>

<AreadivStyle>
<H5Style>관할구역</H5Style>
<H5Style>Jurisdiction</H5Style>
<SelectStyle>
{data ? data.area : ''}
</SelectStyle>
</AreadivStyle>

<PhonedivStyle>
<H5Style>연락처</H5Style>
<H5Style>Phone Number</H5Style>
<InputStyle type="text" value={data ? data.phoneNo : ''}/>
</PhonedivStyle>
</InputboxStyle>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Reportlistpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const Reportlist = () => {
<div className="Reportpage">
<Header />
<ReportlistpageStyle>
<h3 id="page_title">보고서 내역</h3>
<h3 id="page_title">Report List</h3>

<ListboxStyle>
{reports.map((report) => (
Expand Down
46 changes: 23 additions & 23 deletions src/pages/Reportwritepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,90 +163,90 @@ const Reportwrite = () => {
<div className="Reportpage">
<Header />
<ReportwritepageStyle>
<h3 id="page_title">보고서 작성하기</h3>
<h3 id="page_title">Write Report</h3>

<InputboxStyle>
<InfoNameStyle>
<FormDivStyle>
<H5Style>작성자</H5Style>
<H5Style>Writer</H5Style>
<InputStyle id="width_middle" value={data? data.name : ''}/>
</FormDivStyle>

<FormDivStyle>
<H5Style>관할 소방서</H5Style>
<H5Style>Competent fire station</H5Style>
<InputStyle id="width_middle" value={data? data.department : ''}/>
</FormDivStyle>
</InfoNameStyle>

<InfoEventStyle>
<H4Style>발생 개요</H4Style>
<H5Style>일시</H5Style>
<H4Style>Outline</H4Style>
<H5Style>Date and Time</H5Style>
<InputStyle type="date" onChange={e => setDate(e.target.value)}/>
<InputStyle type="time" onChange={e => setTime(e.target.value)}/>

<H5Style>장소</H5Style>
<H5Style>Place</H5Style>
<InputStyle value={title}/>

<H5Style>원인</H5Style>
<H5Style>Cause</H5Style>
<InputStyle id="height_long" onChange={e => setCause(e.target.value)}/>
</InfoEventStyle>

<InfoDamageStyle>
<H4Style>피해 상황</H4Style>
<H5Style>인명 피해</H5Style>
<H4Style>Damage Situation</H4Style>
<H5Style>Casualties</H5Style>
<InfoPeopleNum>
<FormDivStyle>
<H5Style>사망자 수</H5Style>
<H5Style>The number of dead</H5Style>
<ConnectDiv>
<InputStyle id="width_short" onChange={e => setDeathnumber(Number(e.target.value))}/>
<H5Style></H5Style>
<H5Style>people</H5Style>
</ConnectDiv>
</FormDivStyle>
<FormDivStyle>
<H5Style>부상자 수</H5Style>
<H5Style>The number of injuries</H5Style>
<ConnectDiv>
<InputStyle id="width_short" onChange={e => setInjurynumber(Number(e.target.value))}/>
<H5Style></H5Style>
<H5Style>people</H5Style>
</ConnectDiv>
</FormDivStyle>
</InfoPeopleNum>

<H5Style>사망자 명단</H5Style>
<H5Style>A list of dead</H5Style>
<InputStyle id="height_long" onChange={e => setDeathlist(e.target.value)}/>

<H5Style>부상자 명단</H5Style>
<H5Style>A list of injuries</H5Style>
<InputStyle id="height_long" onChange={e => setInjurylist(e.target.value)}/>

<H5Style>재산 피해</H5Style>
<H5Style>Property damage</H5Style>
<ConnectDiv>
<InputStyle onChange={e => setProperty(Number(e.target.value))}/>
<H5Style></H5Style>
<H5Style>KRW</H5Style>
</ConnectDiv>
</InfoDamageStyle>

<InfoMobilizationStyle>
<H4Style>동원 상황</H4Style>
<H4Style>Mobilization situation</H4Style>
<InfoPeopleNum>
<FormDivStyle>
<H5Style>인원</H5Style>
<H5Style>Personnel</H5Style>
<ConnectDiv>
<InputStyle id="width_short" onChange={e => setNumber(Number(e.target.value))}/>
<H5Style></H5Style>
<H5Style>people</H5Style>
</ConnectDiv>
</FormDivStyle>

<FormDivStyle>
<H5Style>장비</H5Style>
<H5Style>Equipment</H5Style>
<ConnectDiv>
<InputStyle id="width_short" onChange={e => setEquipment(Number(e.target.value))}/>
<H5Style></H5Style>
<H5Style>pieces</H5Style>
</ConnectDiv>
</FormDivStyle>
</InfoPeopleNum>
</InfoMobilizationStyle>

<InfoActionStyle>
<H4Style>조치 사항</H4Style>
<H4Style>Action</H4Style>
<InputStyle id="height_long" onChange={e => setAction(e.target.value)}/>
</InfoActionStyle>
</InputboxStyle>
Expand Down
35 changes: 17 additions & 18 deletions src/pages/Signuppage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,63 +170,62 @@ const Signup = () => {
};

const doChangeSecondSelect = (e: React.ChangeEvent<HTMLSelectElement>) => {
const selectedValue = e.target.value;
setTextdocityselected2(e.target.options[e.target.selectedIndex].text);
}


return(
<div className="Signuppage">
<SignuppageStyle>
<h3 id="page_title">회원가입</h3>
<h3 id="page_title">Signup</h3>

<InputboxStyle>
<NamedivStyle>
<H5Style>이름</H5Style>
<H5Style>Name</H5Style>
<InputStyle onChange={e => setName(e.target.value)}/>
</NamedivStyle>

<IDdivStyle>
<TitleStyle>
<H5Style>아이디</H5Style>
{IdConfirm === false && <h6>아이디가 중복입니다</h6>}
{IdConfirm === true && <h6>사용 가능한 아이디입니다</h6>}
<H5Style>Id</H5Style>
{IdConfirm === false && <h6>The ID is duplicated.</h6>}
{IdConfirm === true && <h6>Available.</h6>}
</TitleStyle>
<InputButtonStyle>
<InputStyle onChange={e => setId(e.target.value)} type='text'/>
<Button text="중복 확인" length="short" onClick={idCheck} />
<Button text="ID Check" length="short" onClick={idCheck} />
</InputButtonStyle>
</IDdivStyle>

<PwdivStyle>
<H5Style>비밀번호</H5Style>
<H5Style>Password</H5Style>
<InputStyle onChange={e => setPassword(e.target.value)} type='password'/>
<H5Style>비밀번호 확인</H5Style>
<H5Style>Password Check</H5Style>
<InputStyle onChange={e => setPasswordcheck(e.target.value)} type='password'/>
</PwdivStyle>

<DepartmentdivStyle>
<H5Style>소속</H5Style>
<H5Style>Department</H5Style>
<InputStyle onChange={e => setDepartment(e.target.value)}/>
</DepartmentdivStyle>

<AreadivStyle>
<H5Style>관할구역</H5Style>
<H5Style>Jurisdiction</H5Style>
<SelectStyle>
<Selectbox
docityselected={docityselected}
doChange={doChange}
docityfilteredOptions={docityfilteredOptions}
doChangeSecondSelect={doChangeSecondSelect}/>
<Selectbox
docityselected={docityselected}
doChange={doChange}
docityfilteredOptions={docityfilteredOptions}
doChangeSecondSelect={doChangeSecondSelect}/>
</SelectStyle>
</AreadivStyle>

<PhonedivStyle>
<H5Style>연락처</H5Style>
<H5Style>Phone Number</H5Style>
<InputStyle onChange={e => setPhonenumber(e.target.value)}/>
</PhonedivStyle>

<Button text="가입하기" onClick={onSignup}/>
<Button text="SignUp" onClick={onSignup}/>
</InputboxStyle>
</SignuppageStyle>
</div>
Expand Down
Loading

0 comments on commit 452c69b

Please sign in to comment.