Skip to content

hotfix: 1007 qa 적용 #104

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

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/react-native/src/pages/Home/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ const Detail = withSuspense(() => {
headerHeight - insets.top > 0 ? headerHeight - insets.top : 0;

const handleAddPlan = () => {
navigation.navigate('Home/AddSpot', {
const currentRoute = route.name.split('/')[0];
const nextRoute = `${currentRoute}/AddSpot` as
| 'Home/AddSpot'
| 'Mypage/AddSpot';

navigation.navigate(nextRoute, {
spots: [
{
contentId: Number(contentId),
Expand Down
43 changes: 25 additions & 18 deletions packages/react-native/src/pages/Home/HomeSpotAdd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,31 @@ export default withSuspense(function HomeSpotAdd() {
{isEmpty ? (
<EmptyPlan />
) : (
<View
className="mt-5 flex flex-row flex-wrap "
style={{
gap: CARD_GAP,
}}
>
{data?.map((plan) => (
<View key={plan.id}>
<TripPlanCard
isSelectionMode
isSelect={tripId === plan.id}
cardData={plan}
onCardClick={() => {
setTripId(plan.id);
}}
/>
</View>
))}
<View>
<View className="justify-center items-center">
<Font type="body1" color="white">
나의 여행은 Trip Planner 탭에서 확인할 수 있습니다.
</Font>
</View>
<View
className="mt-5 flex flex-row flex-wrap "
style={{
gap: CARD_GAP,
}}
>
{data?.map((plan) => (
<View key={plan.id}>
<TripPlanCard
isSelectionMode
isSelect={tripId === plan.id}
cardData={plan}
onCardClick={() => {
setTripId(plan.id);
}}
/>
</View>
))}
</View>
</View>
)}
</View>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/src/pages/Maps/Maps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default withSuspense(function Maps({ navigation }: MapsMainProps) {
}}
>
<Font type="title1" color="black">
여행기록보기
여행기록 보기
</Font>
</TouchableOpacity>
</View>
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native/src/routes/MyPageStackNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import MyPage from '@/pages/MyPage';
import EditProfile from '@/pages/MyPage/EditProfile';
import EditProfileWithNickname from '@/pages/MyPage/EditProfileWithNickname';
import Detail from '@/pages/Home/Detail';
import HomeSpotAdd from '@/pages/Home/HomeSpotAdd';

const Stack = createStackNavigator();

Expand All @@ -19,6 +20,7 @@ export default function MyPageStackNavigator() {
component={EditProfileWithNickname}
/>
<Stack.Screen name="MyPage/Detail" component={Detail} />
<Stack.Screen name="MyPage/AddSpot" component={HomeSpotAdd} />
</Stack.Navigator>
);
}
3 changes: 3 additions & 0 deletions packages/react-native/src/types/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export type StackParamList = {
'MyPage/EditProfile': { nickname: string };
'MyPage/EditProfileWithNickname': { nickname: string };
'MyPage/Detail': { contentId: number; id: number; workId: number };
'Mypage/AddSpot': {
spots: SpotResponse[];
};

'Home/Main': undefined;
'Home/Search': { title: string };
Expand Down
Loading