From d022827d67d898b25f453b72243924d1a31b1bc7 Mon Sep 17 00:00:00 2001
From: Sangwook Park <41150708+sw0501@users.noreply.github.com>
Date: Tue, 5 Dec 2023 01:47:03 +0900
Subject: [PATCH 1/3] Feature/backend (#194)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Modify: CI/CD 수정
* Feat: navigation API 개발 완료
* Modify: navigation API 수정
* Fix: navigation API 예외처리
* Feat: CORS http 포트 추가
* Modify: CORS 옵션 수정
* Modify: CORS 옵션 수정
* Feat: https 서버 업데이트
* HTTPS 적용
* Feat: COSR 옵션 https 추가
---
BackendJS/BackendTS/server.js | 5 ++---
BackendTS/server.ts | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/BackendJS/BackendTS/server.js b/BackendJS/BackendTS/server.js
index ed98d36..5a569fb 100644
--- a/BackendJS/BackendTS/server.js
+++ b/BackendJS/BackendTS/server.js
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const app = (0, express_1.default)();
const port = 3005;
-const path_1 = __importDefault(require("path"));
const cors_1 = __importDefault(require("cors"));
const fs_1 = __importDefault(require("fs"));
const https_1 = __importDefault(require("https"));
@@ -43,11 +42,11 @@ const httpsOptions = {
cert: fs_1.default.readFileSync('./KEY/rootca.crt')
};
let corsOptions = {
- origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000', 'http://localhost:80', 'http://localhost:80/#/', 'http://www.easy-taza.site'],
+ origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000', 'http://localhost:80', 'http://localhost:80/#/', 'https://www.easy-taza.site'],
credentials: true
};
app.use((0, cors_1.default)(corsOptions));
-app.use(express_1.default.static(path_1.default.join(__dirname, '../../Backend/Frontend/creative/build')));
+//app.use(express.static(path.join(__dirname, '../../Backend/Frontend/creative/build')))
app.use('/bus', busdata_1.default);
app.use('/subway', subwaydata_1.default);
app.use('/navigation', navigation_1.default);
diff --git a/BackendTS/server.ts b/BackendTS/server.ts
index ab4447e..1662f17 100644
--- a/BackendTS/server.ts
+++ b/BackendTS/server.ts
@@ -20,13 +20,13 @@ const httpsOptions = {
};
let corsOptions: cors.CorsOptions = {
- origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000', 'http://localhost:80', 'http://localhost:80/#/', 'http://www.easy-taza.site'],
+ origin: ['http://localhost:3000/#/', 'http://localhost:3000', 'http://localhost:3005', 'http://34.168.80.42:3000', 'http://172.30.1.35:5000', 'http://localhost:5000', 'http://localhost:80', 'http://localhost:80/#/', 'https://www.easy-taza.site'],
credentials: true
}
app.use(cors(corsOptions));
-app.use(express.static(path.join(__dirname, '../../Backend/Frontend/creative/build')))
+//app.use(express.static(path.join(__dirname, '../../Backend/Frontend/creative/build')))
app.use('/bus', busRouter);
app.use('/subway', subwayRouter);
From e46b9286d536d955b1a8ad0029925d5aae0d376a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EB=B0=95=EA=B7=9C=ED=83=9C?=
<79373803+KyuTae98@users.noreply.github.com>
Date: Tue, 5 Dec 2023 23:41:27 +0900
Subject: [PATCH 2/3] Frontend (#195)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat. 새로 고침 버튼 개발[#46]
* 새로 고침 버튼을 개발하여 클릭 시 다시 해당 정류장의 버스를 받는 기능을 개발하였다.
Resolves #46
* feat. map component 리팩토링
* 지하철 기능을 위해 map component 리팩토링 하였습니다.
* feat. 버스페이지 css작업 완료
* 버스페이지 css작업 완료
* feat. 입력 폼 변경
* 입력 부분에서 검색어 바뀔 때마다 서버에 요청
* feat. 지하철 page생성
지하철 page 뼈대를 만들었습니다.
* feat. map-slice수정
* feat. subway page개발(v1.1)
* feat. main화면 bus화면 디자인 변경
* 변경 했지만 반응형 추가 필요
* feat. 디자인 폰트, 버스 페이지 어느 정도 완성
* 디자인 폰트, 버스 페이지 80% 완성, 반응형으로 만들기 수정
* feat. 지하철 페이지 디자인에 맞춰 개발
* feat. 지하철 메뉴
* 지하철 메뉴에 해당하는 페이지 설정
* feat. 모바일 반응형
* 모바일 반응형 완료 아직 지하철 페이지는 개발 필요함
* feat. 환승 page개발
* feat. HashRouter로 변경
* BrowserRouter에서 HashRouter로 변경
* feat. 이모지 + 서버
* feat.지하철 수정
* feat. map focusing 수정
* feat. 휠체어 기능 하기 전 저장
* 휠체어 기능 하기 전 저장
* feat. 휠체어 수정 완료
* 휠체어 수정 완료
* feat. 디테일한 수정
* 디테일한 수정
* Update Api.js
* feat. 약간의 수정
* 약간의 수정
* feat.폰트, 맵 초기화 수정
* 폰트, 맵 초기화 수정
* feat. 최종 수정
* 최종 수정
* Update StationItem.js
* refac: typescript로 Refectoring중
* feat(front): ts변경 오류 다수 발견
* feat(front): gps기반 지도 중심 개발
* fix(front): Api 수정
* fix(front): map 변경
* feat: 간단 퍼블리싱(1)
* feat:menuBar 수정(SVG로 표현)
* feat(front): 모바일 환경에 맞게 수정
* feat(): busmode 완성
* feat: busmode 수정
* feat: 지하철 수정
* feat: 지하철 마무리
* feat: map Marker 클릭이벤트 등록 완료
* feat: 길찾기 솔루션 개발중
* feat: 수정
* fix: 위도 경도 수정
* fix: api 수정
* fix: api변경
---
Backend/Frontend/creative/src/App.tsx | 2 +
.../creative/src/component/auth/Api.ts | 2 +-
.../subwayElevator/SubwayElevatorDetail.tsx | 34 -----------
.../subwayElevator/SubwayElevatorItem.tsx | 60 -------------------
.../subwayElevator/SubwayElevatorMap.tsx | 28 ---------
.../subwayform/SubwayForm.tsx | 1 +
.../page/subwaypage/SubwayTransferPage.tsx | 48 +++++++++++++++
7 files changed, 52 insertions(+), 123 deletions(-)
delete mode 100644 Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorDetail.tsx
delete mode 100644 Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorItem.tsx
delete mode 100644 Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorMap.tsx
create mode 100644 Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
diff --git a/Backend/Frontend/creative/src/App.tsx b/Backend/Frontend/creative/src/App.tsx
index 3143aaa..e79f56e 100644
--- a/Backend/Frontend/creative/src/App.tsx
+++ b/Backend/Frontend/creative/src/App.tsx
@@ -6,6 +6,7 @@ import SubwayPage from "./page/subwaypage/SubwayPage.tsx"
import SubwayDetailPage from "./page/subwaypage/SubwayDetailPage.tsx"
import SubwayElevatorPage from "./page/subwaypage/SubwayElevator.tsx";
import SubwayBathChairPage from "./page/subwaypage/SubwayBathchair.tsx";
+import SubwayTransferPAge from "./page/subwaypage/SubwayTransferPage.tsx";
import SignPage from "./page/SignPage.tsx";
import SignDetailPage from "./page/SIgnDetailPage.tsx";
@@ -20,6 +21,7 @@ function App() {
} />
} />
} />
+ }/>
}/>
}/>
diff --git a/Backend/Frontend/creative/src/component/auth/Api.ts b/Backend/Frontend/creative/src/component/auth/Api.ts
index 1f24507..1e392ae 100644
--- a/Backend/Frontend/creative/src/component/auth/Api.ts
+++ b/Backend/Frontend/creative/src/component/auth/Api.ts
@@ -1,6 +1,6 @@
import axios from "axios"
export const api = axios.create({
- baseURL: "https://34.145.39.241:3005"
+ baseURL: "https://www.easy-taza.site:3005"
})
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorDetail.tsx b/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorDetail.tsx
deleted file mode 100644
index 1131961..0000000
--- a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorDetail.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import SubwayElevatorItems from "./SubwayElevatorItem";
-
-const StyledElevatorDetail = styled.div`
-display:flex;
-flex-direction:column;
-width: 749px;
-height: 747px;
-background-color:white;
-border: 4px solid #9255F5;
-overflow:auto;
-
-@media (max-width:500px) {
- width:98%;
- height:70vw;
-}
-`
-
-
-const SubwayElevatorDetail = (props:any) => {
- const {info} = props;
- return (
-
- {info.map((element:any) => (
-
- ))}
-
- )
-}
-
-export default SubwayElevatorDetail;
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorItem.tsx b/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorItem.tsx
deleted file mode 100644
index 6b25957..0000000
--- a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorItem.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-import { useDispatch } from "react-redux";
-import { SubwayActions } from "../../../store/Subway-slice";
-
-
-const SubwayElevatorItems = (prop:any) => {
- const { dtlLoc, imgPath } = prop.items;
- const dispatch = useDispatch();
- const ClickSubway = () => {
- dispatch(SubwayActions.addTransfer({ imgPath }))
- }
-
- return (
-
- {dtlLoc}
-
- )
-}
-
-const StyldeSubwayItems = styled.li`
-display:flex;
-justify-content:space-between;
-width:100%;
-align-items:center;
-list-style:none;
-border-bottom: 1px solid #D2D2D2;
-background-color: #FFFFFF;
-color:black;
-font-family: 'Pretendard-Regular';
-:hover{
- cursor: pointer;
-}
-a{
- width:100%;
- display:flex;
- justify-content:space-between;
- align-items:center;
- color:black;
- text-decoration:none;
-}
-.name{
- padding-left:20px;
- font-family: 'Pretendard-Regular';
- font-style: normal;
- font-weight: 600;
- font-size: 40px;
- line-height: 60px;
- color:#000000;
-}
-@media (max-width:500px){
- height:25%;
- .name{
- font-size: 5vw;
- }
-}
-`
-
-
-export default SubwayElevatorItems
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorMap.tsx b/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorMap.tsx
deleted file mode 100644
index 82890a1..0000000
--- a/Backend/Frontend/creative/src/component/subway-component/subwayElevator/SubwayElevatorMap.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from "react";
-import styled from "styled-components";
-
-const StyledElevatorMap = styled.div`
-display:flex;
-flex-direction:column;
-width: 700px;
-height: 45%;
-background-color:white;
-border: 4px solid #9255F5;
-overflow:auto;
-@media (max-width:500px) {
- width:98%;
- height:50vw;
-}
-`
-
-const SubwayElevatorMap = () => {
-
-
- return (
-
-
-
- )
-}
-
-export default SubwayElevatorMap
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx b/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx
index 7af2ca4..812be79 100644
--- a/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx
+++ b/Backend/Frontend/creative/src/component/subway-component/subwayform/SubwayForm.tsx
@@ -27,6 +27,7 @@ const SubwayForm = () => {
dispatch(SubwayActions.addSubwayInfo(data))
dispatch(MapActions.Onsubwaymode())
}).catch(error => {
+ console.log(error)
alert("데이터를 받아오지 못했습니다.")
});
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
new file mode 100644
index 0000000..d07c1e2
--- /dev/null
+++ b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
@@ -0,0 +1,48 @@
+import React, { useEffect, useState } from "react"
+
+import classes from "./SubwayDetailPage.module.css"
+import Header from "../../component/header/Header.tsx"
+import SubwayPanel from "../../component/subway-component/subwaypanel/SubwayPanel.tsx"
+import SubwayDetail from "../../component/subway-component/subwaydetail/SubwayDetail.tsx"
+import SubwayBar from "../../component/subway-component/subwaymenubar/SubwayBar.tsx"
+import MenuBar from "../../component/menu/MenuBar.tsx"
+
+import { useDispatch } from "react-redux"
+import { SubwayActions } from "../../store/Subway-slice.ts"
+import { api } from "../../component/auth/Api.ts"
+import { useParams } from "react-router-dom"
+import { error } from "console"
+
+const SubwayDetailPage = () => {
+ const params = useParams()
+ const dispatch = useDispatch()
+//
+ useEffect(() => {
+ const stCd = params.stCd;
+ const stNm = params.stNm;
+ const railCd = params.railCd;
+ const lnCd = params.lnCd;
+ const getDetail = async () => {
+ await api.get(`/subway/transferMove/transferList/${stCd}/${stNm}/${railCd}/${lnCd}`)
+ .then(res => {
+ const { data } = res;
+ console.log(data)
+ }).catch(error=>{
+ console.log(error)
+ })
+ }
+ getDetail()
+ }, [])
+
+ return (
+
+
+ } />
+
+
+ )
+}
+
+
+
+export default SubwayDetailPage
From b8d61651296a8222418958b7ff4830abcb7f271e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EB=B0=95=EA=B7=9C=ED=83=9C?=
<79373803+KyuTae98@users.noreply.github.com>
Date: Wed, 6 Dec 2023 03:00:30 +0900
Subject: [PATCH 3/3] Frontend (#196)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat. 새로 고침 버튼 개발[#46]
* 새로 고침 버튼을 개발하여 클릭 시 다시 해당 정류장의 버스를 받는 기능을 개발하였다.
Resolves #46
* feat. map component 리팩토링
* 지하철 기능을 위해 map component 리팩토링 하였습니다.
* feat. 버스페이지 css작업 완료
* 버스페이지 css작업 완료
* feat. 입력 폼 변경
* 입력 부분에서 검색어 바뀔 때마다 서버에 요청
* feat. 지하철 page생성
지하철 page 뼈대를 만들었습니다.
* feat. map-slice수정
* feat. subway page개발(v1.1)
* feat. main화면 bus화면 디자인 변경
* 변경 했지만 반응형 추가 필요
* feat. 디자인 폰트, 버스 페이지 어느 정도 완성
* 디자인 폰트, 버스 페이지 80% 완성, 반응형으로 만들기 수정
* feat. 지하철 페이지 디자인에 맞춰 개발
* feat. 지하철 메뉴
* 지하철 메뉴에 해당하는 페이지 설정
* feat. 모바일 반응형
* 모바일 반응형 완료 아직 지하철 페이지는 개발 필요함
* feat. 환승 page개발
* feat. HashRouter로 변경
* BrowserRouter에서 HashRouter로 변경
* feat. 이모지 + 서버
* feat.지하철 수정
* feat. map focusing 수정
* feat. 휠체어 기능 하기 전 저장
* 휠체어 기능 하기 전 저장
* feat. 휠체어 수정 완료
* 휠체어 수정 완료
* feat. 디테일한 수정
* 디테일한 수정
* Update Api.js
* feat. 약간의 수정
* 약간의 수정
* feat.폰트, 맵 초기화 수정
* 폰트, 맵 초기화 수정
* feat. 최종 수정
* 최종 수정
* Update StationItem.js
* refac: typescript로 Refectoring중
* feat(front): ts변경 오류 다수 발견
* feat(front): gps기반 지도 중심 개발
* fix(front): Api 수정
* fix(front): map 변경
* feat: 간단 퍼블리싱(1)
* feat:menuBar 수정(SVG로 표현)
* feat(front): 모바일 환경에 맞게 수정
* feat(): busmode 완성
* feat: busmode 수정
* feat: 지하철 수정
* feat: 지하철 마무리
* feat: map Marker 클릭이벤트 등록 완료
* feat: 길찾기 솔루션 개발중
* feat: 수정
* fix: 위도 경도 수정
* fix: api 수정
* fix: api변경
* feat: 환승역 개발
---
Backend/Frontend/creative/src/App.tsx | 2 +
.../src/component/map/SignMapping.tsx | 5 +-
.../src/component/map/SubwayMapping.tsx | 4 +-
.../subwaytransfer/SubwayTransferDetail.tsx | 59 +++++++++++++++
.../subwaytransfer/SubwayTransferLIst.tsx | 73 +++++++++++++++++++
.../src/page/subwaypage/SubwayDetailPage.tsx | 4 +-
.../page/subwaypage/SubwayTransfer.module.css | 54 --------------
.../subwaypage/SubwayTransferDetailPage.tsx | 31 ++++++++
.../subwaypage/SubwayTransferPage.module.css | 15 ++++
.../page/subwaypage/SubwayTransferPage.tsx | 41 +++--------
10 files changed, 197 insertions(+), 91 deletions(-)
create mode 100644 Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferDetail.tsx
create mode 100644 Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferLIst.tsx
delete mode 100644 Backend/Frontend/creative/src/page/subwaypage/SubwayTransfer.module.css
create mode 100644 Backend/Frontend/creative/src/page/subwaypage/SubwayTransferDetailPage.tsx
create mode 100644 Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.module.css
diff --git a/Backend/Frontend/creative/src/App.tsx b/Backend/Frontend/creative/src/App.tsx
index e79f56e..19d6751 100644
--- a/Backend/Frontend/creative/src/App.tsx
+++ b/Backend/Frontend/creative/src/App.tsx
@@ -7,6 +7,7 @@ import SubwayDetailPage from "./page/subwaypage/SubwayDetailPage.tsx"
import SubwayElevatorPage from "./page/subwaypage/SubwayElevator.tsx";
import SubwayBathChairPage from "./page/subwaypage/SubwayBathchair.tsx";
import SubwayTransferPAge from "./page/subwaypage/SubwayTransferPage.tsx";
+import SubwayTranferDetailPage from "./page/subwaypage/SubwayTransferDetailPage.tsx";
import SignPage from "./page/SignPage.tsx";
import SignDetailPage from "./page/SIgnDetailPage.tsx";
@@ -22,6 +23,7 @@ function App() {
} />
} />
}/>
+ }/>
}/>
}/>
diff --git a/Backend/Frontend/creative/src/component/map/SignMapping.tsx b/Backend/Frontend/creative/src/component/map/SignMapping.tsx
index 808e8b4..91537c1 100644
--- a/Backend/Frontend/creative/src/component/map/SignMapping.tsx
+++ b/Backend/Frontend/creative/src/component/map/SignMapping.tsx
@@ -17,7 +17,6 @@ const Mapping = () => {
const [map,setMap] = useState(null);
const [start,setStart] = useState(null);
const [end,setEnd] = useState(null);
- const [prev,setPrev] = useState(start);
const position = useSelector((state:RootState) => state.map.position)
const {curPosition} = usePosition(geolocationOptions);
const state = useSelector((state:RootState)=>state.sign.State);
@@ -25,8 +24,8 @@ const Mapping = () => {
const tmX = curPosition ? curPosition.tmX: position.tmX;
useEffect(() => {
const container = document.getElementById("signmap");
- const x = position.tmX!==0?Number(position.tmX):tmX!==0?tmX:37.55068403524657;
- const y = position.tmY!==0?Number(position.tmY):tmY!==0?tmY:127.07411251036736;
+ const x = position.tmX!==0?Number(position.tmX):tmX!==0?tmX:127.07411251036736;
+ const y = position.tmY!==0?Number(position.tmY):tmY!==0?tmY:37.55068403524657;
const options = {
center: new window.kakao.maps.LatLng(y, x),
level: 3,
diff --git a/Backend/Frontend/creative/src/component/map/SubwayMapping.tsx b/Backend/Frontend/creative/src/component/map/SubwayMapping.tsx
index 7480eb9..f51a664 100644
--- a/Backend/Frontend/creative/src/component/map/SubwayMapping.tsx
+++ b/Backend/Frontend/creative/src/component/map/SubwayMapping.tsx
@@ -20,8 +20,8 @@ const Mapping = () => {
const tmX = curPosition ? curPosition.tmX: position.tmX;
useEffect(() => {
const container = document.getElementById("subwaymap");
- const x = position.tmX!==0?Number(position.tmX):tmX!==0?tmX:37.55068403524657;
- const y = position.tmY!==0?Number(position.tmY):tmY!==0?tmY:127.07411251036736;
+ const x = position.tmX!==0?Number(position.tmX):tmX!==0?tmX:127.07411251036736;
+ const y = position.tmY!==0?Number(position.tmY):tmY!==0?tmY:37.55068403524657;
const options = {
center: new window.kakao.maps.LatLng(y, x),
level: 3,
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferDetail.tsx b/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferDetail.tsx
new file mode 100644
index 0000000..2f2d384
--- /dev/null
+++ b/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferDetail.tsx
@@ -0,0 +1,59 @@
+import React,{useEffect, useState} from "react";
+import styled from "styled-components";
+import { api } from "../../auth/Api.ts"
+
+const StyledSubwayTransferDetail = styled.main`
+ display:flex;
+ flex-direction:column;
+ align-items: start;
+ justify-content: space-evenly;
+ width: 98vw;
+ height: 40vh;
+ border: 4px solid #FFD12D;
+ overflow: auto;
+`
+const StyledTransferDetailLi = styled.span`
+ font-family: 'Pretendard-Regular';
+ font-weight: 600;
+ margin: 2%;
+ font-size: 1em;
+`
+
+const SubwayTranferDetail = ({param,setImage}:any) => {
+ const [tranferInfo,setTransferInfo] = useState();
+ useEffect(() => {
+ const stCd = param.stCd;
+ const stNm = param.stNm;
+ const railCd = param.railCd;
+ const lnCd = param.lnCd;
+ const prevStinCd = param.prevStinCd;
+ const chthTgtLn = param.chthTgtLn;
+ const chtnNextStinCd = param.chtnNextStinCd;
+ const getDetail = async () => {
+ await api.get(`/subway/transferMove/transferInfo/${stCd}/${stNm}/${railCd}/${lnCd}/${prevStinCd}/${chthTgtLn}/${chtnNextStinCd}`)
+ .then(res => {
+ const { data } = res;
+ setTransferInfo(data)
+ setImage(data[0].imgPath)
+ }).catch(error=>{
+ console.log(error)
+ })
+ }
+ getDetail()
+ }, [param])
+ return(
+
+ {tranferInfo&&(
+
+ {tranferInfo[0].stMovePath} {">>"} {tranferInfo[0].edMovePath}
+ )}
+ {tranferInfo&&tranferInfo.map((ele:any,index:number)=>(
+
+ {ele.mvContDtl}
+
+ ))}
+
+ )
+}
+
+export default SubwayTranferDetail
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferLIst.tsx b/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferLIst.tsx
new file mode 100644
index 0000000..50a80fe
--- /dev/null
+++ b/Backend/Frontend/creative/src/component/subway-component/subwaytransfer/SubwayTransferLIst.tsx
@@ -0,0 +1,73 @@
+import React,{useEffect, useState} from "react";
+import styled from "styled-components";
+import { api } from "../../auth/Api.ts"
+import { Link } from "react-router-dom";
+
+const StyledSubwayTransferDetail = styled.main`
+ display:flex;
+ flex-direction:column;
+ align-items: start;
+ justify-content: space-evenly;
+ width: 98vw;
+ height: 40vh;
+ background-color:white;
+ border: 4px solid #FFD12D;
+ overflow: auto;
+ .TransferLink{
+ width: 100%;
+ text-decoration:none;
+ list-style:none;
+ color: #000000;
+ }
+`
+
+const StyledTransferDetailLi = styled.span`
+ font-family: 'Pretendard-Regular';
+ font-weight: 600;
+ margin-left: 5%;
+ border-bottom: 1px solid;
+ font-size: 1em;
+`
+/*
+/subway/transferMove/transferInfo/:stCd/:stNm/:railCd/:lnCd/:prevStinCd/:chthTgtLn/:chtnNextStinCd
+
+*/
+
+const SubwayTranferDetail = ({param}:any) => {
+ const [source,setSource] = useState<[]>()
+ const [transfer,setTransfer] = useState<[]>()
+ useEffect(() => {
+ const stCd = param.stCd;
+ const stNm = param.stNm;
+ const railCd = param.railCd;
+ const lnCd = param.lnCd;
+ const getDetail = async () => {
+ await api.get(`/subway/transferMove/transferList/${stCd}/${stNm}/${railCd}/${lnCd}`)
+ .then(res => {
+ const { data } = res;
+ const {sourceStation,transferStation} = data
+ setSource(sourceStation);
+ setTransfer(transferStation);
+ }).catch(error=>{
+ alert("환승역이 아닙니다!")
+ window.location.href = `/subway/detail/${stCd}/${stNm}`
+ })
+ }
+ getDetail()
+ }, [param])
+ return(
+
+ {source&&source.map((sor:any)=>(
+ (transfer&&transfer.map((tran:any)=>(
+
+
+ {sor.stNm} - {tran.stNm}
+
+
+ )))
+ ))}
+
+ )
+}
+
+export default SubwayTranferDetail
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayDetailPage.tsx b/Backend/Frontend/creative/src/page/subwaypage/SubwayDetailPage.tsx
index 92a4c53..348e896 100644
--- a/Backend/Frontend/creative/src/page/subwaypage/SubwayDetailPage.tsx
+++ b/Backend/Frontend/creative/src/page/subwaypage/SubwayDetailPage.tsx
@@ -36,8 +36,8 @@ const SubwayDetailPage = () => {
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransfer.module.css b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransfer.module.css
deleted file mode 100644
index 6dec317..0000000
--- a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransfer.module.css
+++ /dev/null
@@ -1,54 +0,0 @@
-.main {
- display: flex;
- justify-content: start;
- width: 100vw;
-}
-
-
-.transfer {
- width: 30vw;
- height: 70vh;
-}
-
-.subwaylist {
- width: 40vw;
- height: 70vh;
-}
-
-.subwaypage {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
-}
-
-
-.subwaymain {
- display: flex;
- margin-top: 20px;
-}
-
-@media (max-width:500px) {
- .main {
- flex-direction: column;
- height: 100%;
- }
-
- .subwaylist {
- width: 100vw;
- height: 43vh;
- }
-
- .transfer {
- width: 100%;
- height: 40vh;
- }
-
- .subwaymain {
- flex-direction: column;
- margin-top: 0;
- height: 100%;
- justify-content: space-between;
- }
-
-}
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferDetailPage.tsx b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferDetailPage.tsx
new file mode 100644
index 0000000..2b9d8bb
--- /dev/null
+++ b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferDetailPage.tsx
@@ -0,0 +1,31 @@
+import React,{useState} from "react"
+
+import classes from "./SubwayTransferPage.module.css"
+import Header from "../../component/header/Header.tsx"
+import SubwayPanel from "../../component/subway-component/subwaypanel/SubwayPanel.tsx"
+import SubwayBar from "../../component/subway-component/subwaymenubar/SubwayBar.tsx"
+import SubwayTransferDetail from "../../component/subway-component/subwaytransfer/SubwayTransferDetail.tsx"
+import MenuBar from "../../component/menu/MenuBar.tsx"
+
+import { useParams } from "react-router-dom"
+
+const SubwayTranferPage = () => {
+ const param = useParams();
+ const [image,setImage] = useState()
+ console.log(image)
+ return (
+
+
+
+ } />
+
+
+
+
+
+ )
+}
+
+
+
+export default SubwayTranferPage
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.module.css b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.module.css
new file mode 100644
index 0000000..586a7e9
--- /dev/null
+++ b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.module.css
@@ -0,0 +1,15 @@
+.subwaypage {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.main {
+ margin-top: 10vh;
+}
+
+.detailImge{
+ width: 100%;
+ height: auto;
+}
\ No newline at end of file
diff --git a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
index d07c1e2..d1cfcae 100644
--- a/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
+++ b/Backend/Frontend/creative/src/page/subwaypage/SubwayTransferPage.tsx
@@ -1,43 +1,24 @@
-import React, { useEffect, useState } from "react"
-import classes from "./SubwayDetailPage.module.css"
+import React from "react"
+
+import classes from "./SubwayTransferPage.module.css"
import Header from "../../component/header/Header.tsx"
import SubwayPanel from "../../component/subway-component/subwaypanel/SubwayPanel.tsx"
-import SubwayDetail from "../../component/subway-component/subwaydetail/SubwayDetail.tsx"
import SubwayBar from "../../component/subway-component/subwaymenubar/SubwayBar.tsx"
+import SubwayTranferList from "../../component/subway-component/subwaytransfer/SubwayTransferLIst.tsx"
import MenuBar from "../../component/menu/MenuBar.tsx"
-import { useDispatch } from "react-redux"
-import { SubwayActions } from "../../store/Subway-slice.ts"
-import { api } from "../../component/auth/Api.ts"
import { useParams } from "react-router-dom"
-import { error } from "console"
-
-const SubwayDetailPage = () => {
- const params = useParams()
- const dispatch = useDispatch()
-//
- useEffect(() => {
- const stCd = params.stCd;
- const stNm = params.stNm;
- const railCd = params.railCd;
- const lnCd = params.lnCd;
- const getDetail = async () => {
- await api.get(`/subway/transferMove/transferList/${stCd}/${stNm}/${railCd}/${lnCd}`)
- .then(res => {
- const { data } = res;
- console.log(data)
- }).catch(error=>{
- console.log(error)
- })
- }
- getDetail()
- }, [])
+const SubwayTranferPage = () => {
+ const param = useParams();
return (
)
@@ -45,4 +26,4 @@ const SubwayDetailPage = () => {
-export default SubwayDetailPage
+export default SubwayTranferPage