Skip to content

Commit

Permalink
Change Reportwritepage ko to eng
Browse files Browse the repository at this point in the history
  • Loading branch information
sehee0207 committed Feb 20, 2024
1 parent 452c69b commit 5329b7b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
13 changes: 12 additions & 1 deletion src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,27 @@ const WeatherDivStyle = styled.div`

const Modal = ({ title, latlng, onClick }: ModalProps) =>{
const [weatherData, setWeatherData] = useState<any>(null);
const [camnum, setCamnum] = useState<number>(2);

Check failure on line 81 in src/components/Modal.tsx

View workflow job for this annotation

GitHub Actions / build

'camnum' is declared but its value is never read.

useEffect(() => {
if(latlng){
if(latlng.lat() === 37.5455){ setCamnum(1) }

fetch(`https://api.openweathermap.org/data/2.5/weather?lat=${latlng.lat()}&lon=${latlng.lng()}&appid=${import.meta.env.VITE_WEATHER_API_KEY}`)
.then(response => response.json())
.then(data => setWeatherData(data))
.catch(error => console.error('Error:', error));
}

axios.get('http://localhost:8080/api/fire-Info')
// axios.get('http://localhost:8080/api/fire-Info')
// .then(response => {
// console.log(response.data)
// })
// .catch(error => {
// console.error('Error:', error);
// });

axios.get("http://localhost:8080/api/fire-Info")
.then(response => {
console.log(response.data)
})
Expand Down
48 changes: 24 additions & 24 deletions src/pages/Reportdetailpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,99 +185,99 @@ const Reportdetail = () => {
<div className="Reportpage">
<Header />
<ReportdetailpageStyle>
<h3 id="page_title">보고서 수정하기</h3>
<h3 id="page_title">Modify Report</h3>
{reports && reports.map((report) => (
<>
<InputboxStyle>
<InfoNameStyle>
<FormDivStyle>
<H5Style>작성자</H5Style>
<H5Style>Writer</H5Style>
<InputStyle id="width_middle" defaultValue={report.member.name} readOnly/>
</FormDivStyle>

<FormDivStyle>
<H5Style>관할 소방서</H5Style>
<H5Style>Competent fire station</H5Style>
<InputStyle id="width_middle" defaultValue={report.member.department} readOnly/>
</FormDivStyle>
</InfoNameStyle>

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

<H5Style>장소</H5Style>
<H5Style>Place</H5Style>
<InputStyle defaultValue={report.reportFirePlace} readOnly/>

<H5Style>원인</H5Style>
<H5Style>Cause</H5Style>
<InputStyle id="height_long" onChange={e => setCause(e.target.value)} defaultValue={report.cause}/>
</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))} defaultValue={report.deathNum}/>
<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))} defaultValue={report.injuryNum} />
<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)} defaultValue={report.theDead}/>

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

<H5Style>재산 피해</H5Style>
<H5Style>Property damage</H5Style>
<ConnectDiv>
<InputStyle id="width_middle" onChange={e => setProperty(Number(e.target.value))} defaultValue={report.money}/>
<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))} defaultValue={report.workerNum}/>
<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))} defaultValue={report.equipNum}/>
<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)} defaultValue={report.action}/>
</InfoActionStyle>
</InputboxStyle>
</>
))}

<InputButtonStyle>
<Button text="제출하기" onClick={onReportFix}/>
<Button text="Submit" onClick={onReportFix}/>
</InputButtonStyle>
</ReportdetailpageStyle>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Reportwritepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const Reportwrite = () => {
</InputboxStyle>

<InputButtonStyle>
<Button text="제출하기" onClick={onReportwrite}/>
<Button text="Submit" onClick={onReportwrite}/>
</InputButtonStyle>

</ReportwritepageStyle>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Signinpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ const Signin = () => {
</InputDivStyle>

<ButtonDivStyle>
<Button text="로그인" onClick={onSignin}/>
<Button text="Signin" onClick={onSignin}/>
<hr />
<Button text="회원가입" onClick={NavigateSignup}/>
<Button text="Signup" onClick={NavigateSignup}/>
</ButtonDivStyle>
</SigninpageStyle>
)
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Signuppage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,13 @@ const Signup = () => {
const [password, setPassword] = useState<string>("");
const [passwordcheck, setPasswordcheck] = useState<string>("");
const [department, setDepartment] = useState<string>("");
const [area, setArea] = useState<string>("");
const [phonenumber, setPhonenumber] = useState<string>("");

const [IdConfirm, setIdConfirm] = useState<boolean | null>(null);

const onSignup = () => {
// navigate("/")
const currentArea = textdocityselected1 + " " + textdocityselected2;
setArea(currentArea);

const user = {
name: name,
Expand Down

0 comments on commit 5329b7b

Please sign in to comment.