Skip to content

Commit

Permalink
feat: 채팅 방 리스트 타입 정의 및 더미 데이터 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
joarthvr committed Dec 1, 2024
1 parent 3a82b2c commit cbb850e
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
Empty file.
21 changes: 21 additions & 0 deletions src/features/chatting/api/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export interface ChatRoom {
chatRoomId: number;
partnerProfileImg: string;
partnerName: string;
recentlyChat: string;
recentTime: string;
}

export interface Meta {
size: number;
nextCursor: string;
hasNext: boolean;
}

export interface ChatListResponse {
data: {
projects: ChatRoom[];
meta: Meta;
};
timeStamp: string;
}
41 changes: 41 additions & 0 deletions src/features/chatting/model/mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { ChatListResponse } from '../api/types';
export const chatListDummyData: ChatListResponse = {
data: {
projects: [
{
chatRoomId: 1,
partnerProfileImg: 'aaaaaa',
partnerName: '조희정',
recentlyChat: 'Hi',
recentTime: '14:08',
},
{
chatRoomId: 2,
partnerProfileImg: 'aaaaaa',
partnerName: '이훈일',
recentlyChat: 'Hi',
recentTime: '14:08',
},
{
chatRoomId: 3,
partnerProfileImg: 'aaaaaa',
partnerName: '조천산',
recentlyChat: 'Hi',
recentTime: '14:08',
},
{
chatRoomId: 4,
partnerProfileImg: 'aaaaaa',
partnerName: '채승규',
recentlyChat: 'Hi',
recentTime: '14:08',
},
],
meta: {
size: 10,
nextCursor: '98',
hasNext: true,
},
},
timeStamp: '2024-11-18T12:28:48.175657',
};

0 comments on commit cbb850e

Please sign in to comment.