-
Notifications
You must be signed in to change notification settings - Fork 0
[#51] 마이페이지 - 지난 여행 #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
jaewonLeeKOR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
페이지 라우팅은 오프라인에서 같이 얘기해보죠
| const fetchAndMove = async () => { | ||
| try { | ||
| const detail = await getSightDetail({ | ||
| id: sightId, | ||
| longitude: location.longitude, | ||
| latitude: location.latitude, | ||
| }); | ||
|
|
||
| // 지도 이동 | ||
| mapRef.current?.moveToLocation({ | ||
| latitude: detail.latitude, | ||
| longitude: detail.longitude, | ||
| latitudeDelta: 0.01, | ||
| longitudeDelta: 0.01, | ||
| }); | ||
|
|
||
| // 선택된 관광지 설정 | ||
| const sight: SightInfo = { | ||
| id: sightId, | ||
| title: detail.title, | ||
| longitude: detail.longitude, | ||
| latitude: detail.latitude, | ||
| geoHash: "", | ||
| }; | ||
|
|
||
| useSightStore.getState().selectSight(sight); | ||
| useSightStore.getState().setSightDetail(detail); | ||
| } catch (error) { | ||
| console.error("관광지 조회 실패:", error); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchAndMove 메서드를 훅으로 빼내서 활용해도 좋을거 같습니다
|
|
||
| const [searchText, setSearchText] = useState(""); | ||
| const [showResults, setShowResults] = useState(false); | ||
| const { sightId } = useLocalSearchParams<{ sightId?: string }>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파라미터명을 더 정확히 사용하는것도 좋을거 같아요.
코드를 읽을때도 한번에 이해가 어렵기도 하고 sightId는 여러 인터페이스 안에서 사용되고 있는 변수명이기도 해서요.
|
|
||
| fetchAndMove(); | ||
| } | ||
| }, [sightId, location.latitude, location.longitude]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에 관광지 세부정보를 보여주는 방식과는 다른 방식을 사용했는데 어떻게 사용하든 통합을 하는게 좋을거 같습니다.
| pathname: "/(tabs)/story", | ||
| params: { storySpotId: item.itemId }, | ||
| } as any); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이야기쪽은 세부정보 페이지로 이동하는 부분을 구현하지 않는거죠?
| const renderItem = ({ item }: { item: CompletedRouteItem }) => ( | ||
| <CardWrapper> | ||
| <SightCard | ||
| image={item.itemImageUrl} | ||
| sightName={item.itemName} | ||
| sightTheme={item.itemType === "SIGHT" ? "관광지" : "이야기 스팟"} | ||
| iconStyle="DETAIL" | ||
| iconColor={theme.colors.text.textSecondary} | ||
| onCardPress={() => handleCardPress(item)} | ||
| /> | ||
| </CardWrapper> | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
피그마에서는 이야기 스팟의 카드와 관광지 카드의 디자인이 다른데 의도적으로 통일시킨건가요?
🧩 구현/변경 사항
사용자 시나리오(UML)
참고
💬 리뷰 받고 싶은 부분 (옵션)