Skip to content

Commit

Permalink
fix: ์ง€๋„ qa
Browse files Browse the repository at this point in the history
  • Loading branch information
ooherin committed Dec 26, 2024
1 parent 1edf07a commit f8e3893
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<FlexBox.Vertical gap="1.5rem">
<FormField.Label label="๊ฐ€๊นŒ์šด ์ง€ํ•˜์ฒ " />
<FlexBox.Vertical gap="1rem">
<SubwayStations stations={nearSubwayStation} />
{!position.latitude ? (
<span>{'๋ณด์‹  ๋ฐฉ๊ณผ ๊ฐ€๊นŒ์šด ์ง€ํ•˜์ฒ ์—ญ์„ ์ฐพ์•„๋“œ๋ฆด๊ฒŒ์š”.'}</span>
) : (
<SubwayStations stations={nearSubwayStation ? nearSubwayStation : []} />
)}
</FlexBox.Vertical>
<FormField.BottomEmptyBox />
</FlexBox.Vertical>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/_common/Subway/SubwayStations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ interface Props {
const SubwayStations = ({ stations, size, textType = 'full' }: Props) => {
return (
<>
{stations?.length ? (
{stations && stations.length > 0 ? (
<S.Box>
{stations?.map(station => (
{stations.map(station => (
<SubwayStationItem textType={textType} size={size} station={station} key={station.stationName} />
))}
</S.Box>
) : (
<span>{'๋ณด์‹  ๋ฐฉ๊ณผ ๊ฐ€๊นŒ์šด ์ง€ํ•˜์ฒ ์—ญ์„ ์ฐพ์•„๋“œ๋ฆด๊ฒŒ์š”.'}</span>
<span>{'์ฃผ๋ณ€์— ๊ฐ€๊นŒ์šด ์ง€ํ•˜์ฒ ์—ญ์ด ์—†์–ด์š”.'}</span>
)}
</>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/styles/subway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const SUBWAY_LINE_PALLETE = {
๊ฒฝ๊ฐ•์„ : '#1C2B55',
์„œํ•ด์„ : '#21AC41',
GTX: '#212177',
'GTX-A': '#98618F',
};

export type SubwayLineName = keyof typeof SUBWAY_LINE_PALLETE;
Expand Down

0 comments on commit f8e3893

Please sign in to comment.