From f8e38930a5c33999dc78637c1ead68637560181d Mon Sep 17 00:00:00 2001
From: ooherin <555ohr@naver.com>
Date: Thu, 26 Dec 2024 22:23:46 +0900
Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A7=80=EB=8F=84=20qa?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../NewChecklist/NewRoomInfoForm/NearSubwayStations.tsx | 7 ++++++-
frontend/src/components/_common/Subway/SubwayStations.tsx | 6 +++---
frontend/src/styles/subway.ts | 1 +
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/frontend/src/components/NewChecklist/NewRoomInfoForm/NearSubwayStations.tsx b/frontend/src/components/NewChecklist/NewRoomInfoForm/NearSubwayStations.tsx
index 2512a06e..fc0ed9fb 100644
--- a/frontend/src/components/NewChecklist/NewRoomInfoForm/NearSubwayStations.tsx
+++ b/frontend/src/components/NewChecklist/NewRoomInfoForm/NearSubwayStations.tsx
@@ -7,12 +7,17 @@ import roomInfoNonValidatedStore from '@/store/roomInfoNonValidatedStore';
const NearSubwayStations = () => {
const nearSubwayStation = useStore(roomInfoNonValidatedStore, state => state.nearSubwayStation);
+ const position = useStore(roomInfoNonValidatedStore, state => state.position);
return (
-
+ {!position.latitude ? (
+ {'보신 방과 가까운 지하철역을 찾아드릴게요.'}
+ ) : (
+
+ )}
diff --git a/frontend/src/components/_common/Subway/SubwayStations.tsx b/frontend/src/components/_common/Subway/SubwayStations.tsx
index c6ed021d..3be82514 100644
--- a/frontend/src/components/_common/Subway/SubwayStations.tsx
+++ b/frontend/src/components/_common/Subway/SubwayStations.tsx
@@ -15,14 +15,14 @@ interface Props {
const SubwayStations = ({ stations, size, textType = 'full' }: Props) => {
return (
<>
- {stations?.length ? (
+ {stations && stations.length > 0 ? (
- {stations?.map(station => (
+ {stations.map(station => (
))}
) : (
- {'보신 방과 가까운 지하철역을 찾아드릴게요.'}
+ {'주변에 가까운 지하철역이 없어요.'}
)}
>
);
diff --git a/frontend/src/styles/subway.ts b/frontend/src/styles/subway.ts
index dd1ca978..7bee81f7 100644
--- a/frontend/src/styles/subway.ts
+++ b/frontend/src/styles/subway.ts
@@ -27,6 +27,7 @@ const SUBWAY_LINE_PALLETE = {
경강선: '#1C2B55',
서해선: '#21AC41',
GTX: '#212177',
+ 'GTX-A': '#98618F',
};
export type SubwayLineName = keyof typeof SUBWAY_LINE_PALLETE;