From fa383214c8fb26ce57bc17001c611b4414f7b18e Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Sun, 12 Apr 2026 17:10:25 +0900 Subject: [PATCH 1/9] [ADD/#86] Mock data for chat rooms --- src/pages/admin/chat/model/mockChatRooms.ts | 25 +++++++++++++++++++ src/pages/partner/chat/model/mockChatRooms.ts | 18 +++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/pages/admin/chat/model/mockChatRooms.ts create mode 100644 src/pages/partner/chat/model/mockChatRooms.ts diff --git a/src/pages/admin/chat/model/mockChatRooms.ts b/src/pages/admin/chat/model/mockChatRooms.ts new file mode 100644 index 0000000..1e4153f --- /dev/null +++ b/src/pages/admin/chat/model/mockChatRooms.ts @@ -0,0 +1,25 @@ +import type { ChatRoomItemProps } from "@/entities/chat"; + +export const MOCK_ADMIN_CHAT_ROOMS: ChatRoomItemProps[] = [ + { + id: "1", + profileImage: { uri: "https://picsum.photos/seed/store1/48" }, + roomName: "인쌩맥주 숭실대점", + lastMessage: "제휴 협력 가능할까요?", + unreadCount: 1, + }, + { + id: "2", + profileImage: { uri: "https://picsum.photos/seed/store2/48" }, + roomName: "역전할머니맥주 숭실대점", + lastMessage: "감사합니다..!", + unreadCount: 200, + }, + { + id: "3", + profileImage: { uri: "https://picsum.photos/seed/store3/48" }, + roomName: "리얼후라이", + lastMessage: "잘 부탁드립니다", + unreadCount: 0, + }, +]; diff --git a/src/pages/partner/chat/model/mockChatRooms.ts b/src/pages/partner/chat/model/mockChatRooms.ts new file mode 100644 index 0000000..e61e5d2 --- /dev/null +++ b/src/pages/partner/chat/model/mockChatRooms.ts @@ -0,0 +1,18 @@ +import type { ChatRoomItemProps } from "@/entities/chat"; + +export const MOCK_PARTNER_CHAT_ROOMS: ChatRoomItemProps[] = [ + { + id: "1", + profileImage: { uri: "https://picsum.photos/seed/admin1/48" }, + roomName: "ASSU 운영진", + lastMessage: "제휴 조건 검토 중입니다.", + unreadCount: 2, + }, + { + id: "2", + profileImage: { uri: "https://picsum.photos/seed/admin2/48" }, + roomName: "ASSU 관리자", + lastMessage: "확인했습니다. 감사합니다!", + unreadCount: 0, + }, +]; From d2a39f72e7d45702f55d36c9baf138e8483780b0 Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Sun, 12 Apr 2026 17:11:46 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[CHORE/#86]=20=EC=B1=97=EB=A3=B8=EC=95=84?= =?UTF-8?q?=EC=9D=B4=ED=85=9C=20=ED=83=80=EC=9E=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/chat/model/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/entities/chat/model/types.ts b/src/entities/chat/model/types.ts index dc322ae..5544976 100644 --- a/src/entities/chat/model/types.ts +++ b/src/entities/chat/model/types.ts @@ -1,10 +1,12 @@ import type { ImageSource } from "expo-image"; export interface ChatRoomItemProps { + id: string; profileImage: ImageSource; roomName: string; lastMessage: string; unreadCount?: number; + onPress?: () => void; } export interface Message { From dbe8ae6534cf18eae8eb93abfc3353d96ac50a79 Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Sun, 12 Apr 2026 17:13:08 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[FEAT/#86]=20=EC=B1=84=ED=8C=85=EB=82=B4?= =?UTF-8?q?=EC=97=AD=20UI=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/chat/ui/ChatRoomItem.tsx | 63 +++++++++++-------- src/pages/admin/chat/ui/AdminChatPage.tsx | 45 +++++++++++-- src/pages/partner/chat/ui/PartnerChatPage.tsx | 47 ++++++++++++-- 3 files changed, 121 insertions(+), 34 deletions(-) diff --git a/src/entities/chat/ui/ChatRoomItem.tsx b/src/entities/chat/ui/ChatRoomItem.tsx index dd9c6ca..4d5d180 100644 --- a/src/entities/chat/ui/ChatRoomItem.tsx +++ b/src/entities/chat/ui/ChatRoomItem.tsx @@ -1,5 +1,6 @@ -import { Text, View } from "react-native"; +import { Pressable, Text, View } from "react-native"; +import { colorTokens } from "@/shared/styles/tokens"; import { ProfileAvatar } from "@/shared/ui/profile"; import type { ChatRoomItemProps } from "../model/types"; @@ -9,35 +10,45 @@ export function ChatRoomItem({ roomName, lastMessage, unreadCount = 0, + onPress, }: ChatRoomItemProps) { + const displayCount = unreadCount > 99 ? "99+" : unreadCount; // 100 이상은 "99+"로 표시 return ( - - {/* Left: profile + texts */} - - + + {({ pressed }) => ( + + + {/* 프로필 + 텍스트 영역 */} + + + {/* 텍스트 */} + + + {roomName} + + + {lastMessage} + + + - {/* Text area */} - - - {roomName} - - - {lastMessage} - - - - - {/* Right: unread count badge */} - {unreadCount > 0 && ( - - - {unreadCount} - + {/* 안읽은 메세지 카운트 뱃지 */} + {unreadCount > 0 && ( + + + {displayCount} + + + )} + )} - + ); } diff --git a/src/pages/admin/chat/ui/AdminChatPage.tsx b/src/pages/admin/chat/ui/AdminChatPage.tsx index d48983b..32b4eab 100644 --- a/src/pages/admin/chat/ui/AdminChatPage.tsx +++ b/src/pages/admin/chat/ui/AdminChatPage.tsx @@ -1,9 +1,46 @@ -import { Text, View } from "react-native"; +import { FlatList, View } from "react-native"; +import { ChatRoomItem, type ChatRoomItemProps } from "@/entities/chat"; +import { EmptyState } from "@/shared/ui/empty-state"; +import { PageLayout } from "@/shared/ui/layout"; +import { PageTitle } from "@/shared/ui/page-title"; + +import { MOCK_ADMIN_CHAT_ROOMS } from "../model/mockChatRooms"; //목데이터 + +// 채팅방 리스트 로컬 컴포넌트 +function ChatRoomList({ rooms }: { rooms: ChatRoomItemProps[] }) { + return ( + item.id} + getItemLayout={(_, index) => ({ + length: 70, + offset: 70 * index, + index, + })} + renderItem={({ item }) => } + ListEmptyComponent={ + + } + /> + ); +} +// PageLayout에 px-6을 적용하지 않은 이유: 디자인 상 채팅방 아이템이 화면 양 끝까지 닿아야 하기 때문 export function AdminChatPage() { return ( - - 관리자 채팅 - + + + + + + ); } diff --git a/src/pages/partner/chat/ui/PartnerChatPage.tsx b/src/pages/partner/chat/ui/PartnerChatPage.tsx index 727647a..b9dc1b9 100644 --- a/src/pages/partner/chat/ui/PartnerChatPage.tsx +++ b/src/pages/partner/chat/ui/PartnerChatPage.tsx @@ -1,9 +1,48 @@ -import { Text, View } from "react-native"; +import { FlatList, View } from "react-native"; +import { ChatRoomItem, type ChatRoomItemProps } from "@/entities/chat"; +import { EmptyState } from "@/shared/ui/empty-state"; +import { PageLayout } from "@/shared/ui/layout"; +import { PageTitle } from "@/shared/ui/page-title"; + +import { MOCK_PARTNER_CHAT_ROOMS } from "../model/mockChatRooms"; // 목데이터 + +// 채팅방 리스트 로컬 컴포넌트 +function ChatRoomList({ rooms }: { rooms: ChatRoomItemProps[] }) { + return ( + item.id} + getItemLayout={(_, index) => ({ + length: 70, + offset: 70 * index, + index, + })} + renderItem={({ item }) => } + ListEmptyComponent={ + + } + contentContainerClassName="pt-2" + /> + ); +} + +// PageLayout에 px-6을 적용하지 않은 이유: 디자인 상 채팅방 아이템이 화면 양 끝까지 닿아야 하기 때문 export function PartnerChatPage() { return ( - - 업체 채팅 - + + + + + + ); } From b2c7763e00150175ea2668ab67e75816a76faa39 Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Sun, 12 Apr 2026 17:14:35 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[CHORE/#86]=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20+=20=EB=B0=94=EC=9D=B4=EC=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/dashboard/ui/AdminDashboardPage.tsx | 2 +- src/pages/admin/home/ui/AdminHomePage.tsx | 2 +- .../customer-service/ui/CustomerServicePage.tsx | 12 ++++++------ src/pages/customer-service/ui/InquiryItem.tsx | 2 +- src/pages/dev-hub/ui/DevHubPage.tsx | 6 +++--- .../inquiry-detail/ui/InquiryDetailPage.tsx | 16 ++++++++++------ .../dashboard/ui/PartnerDashboardPage.tsx | 2 +- src/pages/partner/home/ui/PartnerHomePage.tsx | 2 +- .../ui/PartnershipProposalPage.tsx | 2 +- .../suggestion-form/model/useSuggestionForm.ts | 3 +-- .../suggestion/ui/StudentSuggestionPage.tsx | 4 +--- .../student/suggestion/ui/SuggestionSection.tsx | 2 +- src/shared/assets/icons/index.ts | 2 +- src/shared/ui/app-top-bar/AppTopBar.tsx | 10 ++++++++-- .../signup-user-flow/ui/SignupUserFlowWidget.tsx | 2 +- 15 files changed, 38 insertions(+), 31 deletions(-) diff --git a/src/pages/admin/dashboard/ui/AdminDashboardPage.tsx b/src/pages/admin/dashboard/ui/AdminDashboardPage.tsx index f50f8dd..2a0caf4 100644 --- a/src/pages/admin/dashboard/ui/AdminDashboardPage.tsx +++ b/src/pages/admin/dashboard/ui/AdminDashboardPage.tsx @@ -49,7 +49,7 @@ export function AdminDashboardPage() { activeOpacity={0.8} className="bg-primary items-center justify-center rounded-[8px] h-[41px]" onPress={() => { - router.push("/(protected)/(admin)/partner-ship-suggestion-box"); + router.push("/(protected)/admin/partner-ship-suggestion-box"); }} > diff --git a/src/pages/admin/home/ui/AdminHomePage.tsx b/src/pages/admin/home/ui/AdminHomePage.tsx index 3aea0a1..f3ab44e 100644 --- a/src/pages/admin/home/ui/AdminHomePage.tsx +++ b/src/pages/admin/home/ui/AdminHomePage.tsx @@ -91,7 +91,7 @@ export function AdminHomePage() { - router.push("/(protected)/(admin)/admin-partnership-list") + router.push("/(protected)/admin/admin-partnership-list") } /> diff --git a/src/pages/customer-service/ui/CustomerServicePage.tsx b/src/pages/customer-service/ui/CustomerServicePage.tsx index bba159d..9520f60 100644 --- a/src/pages/customer-service/ui/CustomerServicePage.tsx +++ b/src/pages/customer-service/ui/CustomerServicePage.tsx @@ -1,14 +1,14 @@ +import { useRef, useState } from "react"; import type { SubmitHandler, UseFormHandleSubmit } from "react-hook-form"; +import { ActivityIndicator, Pressable, Text, View } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import type { InquiryFormData } from "@/features/inquiry-form"; import { InquiryForm } from "@/features/inquiry-form"; -import { InquiryList } from "./InquiryList"; +import { colorTokens } from "@/shared/styles/tokens"; import { AppTopBar } from "@/shared/ui/app-top-bar"; import { PageLayout } from "@/shared/ui/layout"; import { TabBar } from "@/shared/ui/TabBar"; -import { colorTokens } from "@/shared/styles/tokens"; -import { useRef, useState } from "react"; -import { ActivityIndicator, Pressable, Text, View } from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; -import type { InquiryFormData } from "@/features/inquiry-form"; +import { InquiryList } from "./InquiryList"; // Mock user data - 실제 auth 시스템 연결은 나중에 const MOCK_USER = { diff --git a/src/pages/customer-service/ui/InquiryItem.tsx b/src/pages/customer-service/ui/InquiryItem.tsx index 74bf435..5c55179 100644 --- a/src/pages/customer-service/ui/InquiryItem.tsx +++ b/src/pages/customer-service/ui/InquiryItem.tsx @@ -1,7 +1,7 @@ import { useRouter } from "expo-router"; import { Pressable, Text, View } from "react-native"; -import { colorTokens } from "@/shared/styles/tokens"; import type { Inquiry } from "@/entities/inquiry"; +import { colorTokens } from "@/shared/styles/tokens"; interface InquiryItemProps { inquiry: Inquiry; diff --git a/src/pages/dev-hub/ui/DevHubPage.tsx b/src/pages/dev-hub/ui/DevHubPage.tsx index 65d5559..8b312c4 100644 --- a/src/pages/dev-hub/ui/DevHubPage.tsx +++ b/src/pages/dev-hub/ui/DevHubPage.tsx @@ -13,7 +13,7 @@ export function DevHubPage() { router.push("/(protected)/(student)/(tabs)/home")} + onPress={() => router.push("/(protected)/student/(tabs)/home")} > 학생 홈으로 이동 @@ -22,7 +22,7 @@ export function DevHubPage() { router.push("/(protected)/(admin)/(tabs)/home")} + onPress={() => router.push("/(protected)/admin/(tabs)/home")} > 관리자 홈으로 이동 @@ -31,7 +31,7 @@ export function DevHubPage() { router.push("/(protected)/(partner)/(tabs)/home")} + onPress={() => router.push("/(protected)/partner/(tabs)/home")} > 제휴업체 홈으로 이동 diff --git a/src/pages/inquiry-detail/ui/InquiryDetailPage.tsx b/src/pages/inquiry-detail/ui/InquiryDetailPage.tsx index a29fee9..eaa04a4 100644 --- a/src/pages/inquiry-detail/ui/InquiryDetailPage.tsx +++ b/src/pages/inquiry-detail/ui/InquiryDetailPage.tsx @@ -1,8 +1,14 @@ -import { BackArrowIcon } from "@/shared/assets/icons"; -import { colorTokens } from "@/shared/styles/tokens"; import { useLocalSearchParams, useRouter } from "expo-router"; -import { ActivityIndicator, Pressable, ScrollView, Text, View } from "react-native"; +import { + ActivityIndicator, + Pressable, + ScrollView, + Text, + View, +} from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; +import { BackArrowIcon } from "@/shared/assets/icons"; +import { colorTokens } from "@/shared/styles/tokens"; import { useInquiryDetail } from "../api/useInquiryDetail"; export function InquiryDetailPage() { @@ -43,9 +49,7 @@ export function InquiryDetailPage() { )} {data && ( - + {/* 제목 + 날짜 */} diff --git a/src/pages/partner/dashboard/ui/PartnerDashboardPage.tsx b/src/pages/partner/dashboard/ui/PartnerDashboardPage.tsx index 5146b56..3ffbd39 100644 --- a/src/pages/partner/dashboard/ui/PartnerDashboardPage.tsx +++ b/src/pages/partner/dashboard/ui/PartnerDashboardPage.tsx @@ -6,7 +6,7 @@ export function PartnerDashboardPage() { 업체 대시보드 router.push("/(protected)/(partner)/review")} + onPress={() => router.push("/(protected)/partner/review")} className="bg-primary px-screen-m py-card-p rounded-md items-center" > diff --git a/src/pages/partner/home/ui/PartnerHomePage.tsx b/src/pages/partner/home/ui/PartnerHomePage.tsx index 46d9810..5bada26 100644 --- a/src/pages/partner/home/ui/PartnerHomePage.tsx +++ b/src/pages/partner/home/ui/PartnerHomePage.tsx @@ -38,7 +38,7 @@ export function PartnerHomePage() { partnerships={MOCK_PARTNERSHIPS} title="제휴단체 목록" onViewAll={() => - router.push("/(protected)/(partner)/partner-partnership-list") + router.push("/(protected)/partner/partner-partnership-list") } /> diff --git a/src/pages/partnership-proposal/ui/PartnershipProposalPage.tsx b/src/pages/partnership-proposal/ui/PartnershipProposalPage.tsx index d24082e..e9b33b7 100644 --- a/src/pages/partnership-proposal/ui/PartnershipProposalPage.tsx +++ b/src/pages/partnership-proposal/ui/PartnershipProposalPage.tsx @@ -9,8 +9,8 @@ import { ProposalInfoStep, proposalSchema, } from "@/features/partnership-proposal"; -import { PageLayout } from "@/shared/ui/layout"; import { AppTopBar } from "@/shared/ui/app-top-bar"; +import { PageLayout } from "@/shared/ui/layout"; type Step = "step1" | "step2" | "complete"; diff --git a/src/pages/student/suggestion-form/model/useSuggestionForm.ts b/src/pages/student/suggestion-form/model/useSuggestionForm.ts index 9e96e14..ed78217 100644 --- a/src/pages/student/suggestion-form/model/useSuggestionForm.ts +++ b/src/pages/student/suggestion-form/model/useSuggestionForm.ts @@ -21,8 +21,7 @@ export function useSuggestionForm() { const { mutate } = useMutation({ mutationFn: postSuggestion, - onSuccess: () => - router.replace("/(protected)/(student)/suggestion-complete"), + onSuccess: () => router.replace("/(protected)/student/suggestion-complete"), // TODO: API 연동 시 에러 핸들링 추가 (예: 토스트 메시지) }); diff --git a/src/pages/student/suggestion/ui/StudentSuggestionPage.tsx b/src/pages/student/suggestion/ui/StudentSuggestionPage.tsx index e1a4fe2..70ddd11 100644 --- a/src/pages/student/suggestion/ui/StudentSuggestionPage.tsx +++ b/src/pages/student/suggestion/ui/StudentSuggestionPage.tsx @@ -56,9 +56,7 @@ export function StudentSuggestionPage() { {count > COLLAPSED_LIMIT && ( - router.push( - `/(protected)/(student)/benefit-all?month=${month}`, - ) + router.push(`/(protected)/student/benefit-all?month=${month}`) } > diff --git a/src/pages/student/suggestion/ui/SuggestionSection.tsx b/src/pages/student/suggestion/ui/SuggestionSection.tsx index 05ddc94..382915f 100644 --- a/src/pages/student/suggestion/ui/SuggestionSection.tsx +++ b/src/pages/student/suggestion/ui/SuggestionSection.tsx @@ -29,7 +29,7 @@ export function SuggestionSection() { router.push("/(protected)/(student)/suggestion-form")} + onPress={() => router.push("/(protected)/student/suggestion-form")} > 제휴 건의하기 diff --git a/src/shared/assets/icons/index.ts b/src/shared/assets/icons/index.ts index 17bad60..5bc1e74 100644 --- a/src/shared/assets/icons/index.ts +++ b/src/shared/assets/icons/index.ts @@ -21,7 +21,7 @@ export { default as SearchIcon } from "./search-icon.svg"; export { default as SpeechBubbleIcon } from "./speech-bubble-icon.svg"; export { default as StampActive } from "./stamp-active.svg"; export { default as StampInactive } from "./stamp-inactive.svg"; -export { default as UploadFilesIcon } from "./upload-files-icon.svg"; export { StarIcon } from "./star-icon"; +export { default as UploadFilesIcon } from "./upload-files-icon.svg"; export { default as UserIcon } from "./user-icon.svg"; export { default as WritingIcon } from "./writing-icon.svg"; diff --git a/src/shared/ui/app-top-bar/AppTopBar.tsx b/src/shared/ui/app-top-bar/AppTopBar.tsx index f66ce59..fd10f11 100644 --- a/src/shared/ui/app-top-bar/AppTopBar.tsx +++ b/src/shared/ui/app-top-bar/AppTopBar.tsx @@ -11,14 +11,20 @@ interface AppTopBarProps { export function AppTopBar({ title, onBack }: AppTopBarProps) { return ( - router.back())} className="absolute left-6"> + router.back())} + className="absolute left-6" + > - {title} + + {title} + ); } diff --git a/src/widgets/signup-user-flow/ui/SignupUserFlowWidget.tsx b/src/widgets/signup-user-flow/ui/SignupUserFlowWidget.tsx index b002740..7d839f9 100644 --- a/src/widgets/signup-user-flow/ui/SignupUserFlowWidget.tsx +++ b/src/widgets/signup-user-flow/ui/SignupUserFlowWidget.tsx @@ -166,7 +166,7 @@ export function SignupUserFlowWidget() { router.replace("/(protected)/(student)/(tabs)/home") + ? () => router.replace("/(protected)/student/(tabs)/home") : goNext } disabled={isBottomDisabled} From ba5a7f43cc50297ab701fee19ba3627e4cc1f7e3 Mon Sep 17 00:00:00 2001 From: Eunhye Kim <129603460+eunhyekimyeah@users.noreply.github.com> Date: Sun, 12 Apr 2026 17:31:24 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[CHORE/#86]=20disabled=20=EC=86=8D=EC=84=B1?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/entities/chat/ui/ChatRoomItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entities/chat/ui/ChatRoomItem.tsx b/src/entities/chat/ui/ChatRoomItem.tsx index 4d5d180..05ad8e5 100644 --- a/src/entities/chat/ui/ChatRoomItem.tsx +++ b/src/entities/chat/ui/ChatRoomItem.tsx @@ -14,7 +14,7 @@ export function ChatRoomItem({ }: ChatRoomItemProps) { const displayCount = unreadCount > 99 ? "99+" : unreadCount; // 100 이상은 "99+"로 표시 return ( - + {({ pressed }) => ( Date: Sun, 12 Apr 2026 17:32:17 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[CHORE/#86]=20empty=20state=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/pages/partner/chat/ui/PartnerChatPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/partner/chat/ui/PartnerChatPage.tsx b/src/pages/partner/chat/ui/PartnerChatPage.tsx index b9dc1b9..ecd58d4 100644 --- a/src/pages/partner/chat/ui/PartnerChatPage.tsx +++ b/src/pages/partner/chat/ui/PartnerChatPage.tsx @@ -22,7 +22,7 @@ function ChatRoomList({ rooms }: { rooms: ChatRoomItemProps[] }) { ListEmptyComponent={ } contentContainerClassName="pt-2" From 12f6dbda9f9d7cbc6ab38f394f82a7ac2bca0dfe Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Sun, 12 Apr 2026 17:56:31 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[FEAT/#86]=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/chat/index.ts | 8 ++++- src/entities/chat/ui/ChatRoomList.tsx | 36 +++++++++++++++++++ src/entities/chat/ui/index.ts | 1 + src/pages/admin/chat/ui/AdminChatPage.tsx | 30 ++-------------- src/pages/partner/chat/ui/PartnerChatPage.tsx | 34 +++--------------- 5 files changed, 51 insertions(+), 58 deletions(-) create mode 100644 src/entities/chat/ui/ChatRoomList.tsx diff --git a/src/entities/chat/index.ts b/src/entities/chat/index.ts index a025c5c..664abca 100644 --- a/src/entities/chat/index.ts +++ b/src/entities/chat/index.ts @@ -3,4 +3,10 @@ export type { Message, MessageItemProps, } from "./model/types"; -export { ChatRoomItem, MessageBubble, MessageItem, MessageTime } from "./ui"; +export { + ChatRoomItem, + ChatRoomList, + MessageBubble, + MessageItem, + MessageTime, +} from "./ui"; diff --git a/src/entities/chat/ui/ChatRoomList.tsx b/src/entities/chat/ui/ChatRoomList.tsx new file mode 100644 index 0000000..04cddba --- /dev/null +++ b/src/entities/chat/ui/ChatRoomList.tsx @@ -0,0 +1,36 @@ +import { FlatList, Pressable } from "react-native"; + +import { EmptyState } from "@/shared/ui/empty-state"; + +import type { ChatRoomItemProps } from "../model/types"; +import { ChatRoomItem } from "./ChatRoomItem"; + +interface ChatRoomListProps { + rooms: ChatRoomItemProps[]; + onPressRoom?: (id: string) => void; +} + +export function ChatRoomList({ rooms, onPressRoom }: ChatRoomListProps) { + return ( + item.id} + getItemLayout={(_, index) => ({ + length: 70, + offset: 70 * index, + index, + })} + renderItem={({ item }) => ( + onPressRoom?.(item.id)}> + + + )} + ListEmptyComponent={ + + } + /> + ); +} diff --git a/src/entities/chat/ui/index.ts b/src/entities/chat/ui/index.ts index bc3fe9b..c3bfacd 100644 --- a/src/entities/chat/ui/index.ts +++ b/src/entities/chat/ui/index.ts @@ -1,4 +1,5 @@ export { ChatRoomItem } from "./ChatRoomItem"; +export { ChatRoomList } from "./ChatRoomList"; export { MessageBubble } from "./MessageBubble"; export { MessageItem } from "./MessageItem"; export { MessageTime } from "./MessageTime"; diff --git a/src/pages/admin/chat/ui/AdminChatPage.tsx b/src/pages/admin/chat/ui/AdminChatPage.tsx index 32b4eab..44ed81d 100644 --- a/src/pages/admin/chat/ui/AdminChatPage.tsx +++ b/src/pages/admin/chat/ui/AdminChatPage.tsx @@ -1,34 +1,10 @@ -import { FlatList, View } from "react-native"; - -import { ChatRoomItem, type ChatRoomItemProps } from "@/entities/chat"; -import { EmptyState } from "@/shared/ui/empty-state"; +import { View } from "react-native"; +import { ChatRoomList } from "@/entities/chat"; import { PageLayout } from "@/shared/ui/layout"; import { PageTitle } from "@/shared/ui/page-title"; -import { MOCK_ADMIN_CHAT_ROOMS } from "../model/mockChatRooms"; //목데이터 +import { MOCK_ADMIN_CHAT_ROOMS } from "../model/mockChatRooms"; -// 채팅방 리스트 로컬 컴포넌트 -function ChatRoomList({ rooms }: { rooms: ChatRoomItemProps[] }) { - return ( - item.id} - getItemLayout={(_, index) => ({ - length: 70, - offset: 70 * index, - index, - })} - renderItem={({ item }) => } - ListEmptyComponent={ - - } - /> - ); -} -// PageLayout에 px-6을 적용하지 않은 이유: 디자인 상 채팅방 아이템이 화면 양 끝까지 닿아야 하기 때문 export function AdminChatPage() { return ( item.id} - getItemLayout={(_, index) => ({ - length: 70, - offset: 70 * index, - index, - })} - renderItem={({ item }) => } - ListEmptyComponent={ - - } - contentContainerClassName="pt-2" - /> - ); -} +import { MOCK_PARTNER_CHAT_ROOMS } from "../model/mockChatRooms"; -// PageLayout에 px-6을 적용하지 않은 이유: 디자인 상 채팅방 아이템이 화면 양 끝까지 닿아야 하기 때문 export function PartnerChatPage() { return ( From d0c9b0773ad2538c7c4efd68201b137bb4b760f9 Mon Sep 17 00:00:00 2001 From: KimEunHye Date: Fri, 17 Apr 2026 14:39:30 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[MOD/#86]=20=EC=A4=91=EC=B2=A9=EB=90=9C=20p?= =?UTF-8?q?ressable=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/chat/ui/ChatRoomList.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/entities/chat/ui/ChatRoomList.tsx b/src/entities/chat/ui/ChatRoomList.tsx index 04cddba..dfcb64c 100644 --- a/src/entities/chat/ui/ChatRoomList.tsx +++ b/src/entities/chat/ui/ChatRoomList.tsx @@ -1,4 +1,4 @@ -import { FlatList, Pressable } from "react-native"; +import { FlatList } from "react-native"; import { EmptyState } from "@/shared/ui/empty-state"; @@ -21,9 +21,7 @@ export function ChatRoomList({ rooms, onPressRoom }: ChatRoomListProps) { index, })} renderItem={({ item }) => ( - onPressRoom?.(item.id)}> - - + onPressRoom?.(item.id)} /> )} ListEmptyComponent={ Date: Mon, 27 Apr 2026 17:16:27 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[FEAT/#86]=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20UI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/partner/chat/ui/PartnerChatPage.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/pages/partner/chat/ui/PartnerChatPage.tsx b/src/pages/partner/chat/ui/PartnerChatPage.tsx index 08e72a5..9468f08 100644 --- a/src/pages/partner/chat/ui/PartnerChatPage.tsx +++ b/src/pages/partner/chat/ui/PartnerChatPage.tsx @@ -5,18 +5,10 @@ import { PageTitle } from "@/shared/ui/page-title"; import { MOCK_PARTNER_CHAT_ROOMS } from "../model/mockChatRooms"; -// PageLayout에 px-6을 적용하지 않은 이유: 디자인 상 채팅방 아이템이 화면 양 끝까지 닿아야 하기 때문 export function PartnerChatPage() { return ( - - - - + + );