-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: navigate 전 모달 닫기 * fix: 채팅 목록 탭 전환 시 깜빡거리는 버그 해결 * feat: 채팅 목록 스켈레톤 ui 적용 * feat: 채팅방 나가기 validation 구현 * fix: api 수정사항 반영
- Loading branch information
Showing
9 changed files
with
228 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Flex } from '@components/shared/Flex'; | ||
|
||
import { theme } from '@styles/theme.ts'; | ||
|
||
import { ChatRoom } from '@type/models/ChatRoom.ts'; | ||
|
||
import { PATH_NAME } from '@consts/pathName.ts'; | ||
|
||
import { ChatRoomItem } from './ChatRoomItem.tsx'; | ||
import { InformText } from './ChatRoomListPage.style.ts'; | ||
import { useChatRoomList } from './useChatRoomList.ts'; | ||
|
||
export const ChatRoomList = () => { | ||
const { selectedTabChatRoomList, moveToPage } = useChatRoomList(); | ||
|
||
return ( | ||
<> | ||
{selectedTabChatRoomList.length !== 0 ? ( | ||
selectedTabChatRoomList.map((chatRoomItem: ChatRoom) => ( | ||
<ChatRoomItem | ||
chatRoomItem={chatRoomItem} | ||
key={chatRoomItem.id} | ||
onClickChatRoomItem={() => | ||
moveToPage(PATH_NAME.GET_CHAT_PATH(String(chatRoomItem.id))) | ||
} | ||
/> | ||
)) | ||
) : ( | ||
<Flex justify="center" gap={16}> | ||
<InformText size={theme.FONT_SIZE.XS} weight={300}> | ||
채팅 내역이 없습니다. | ||
</InformText> | ||
</Flex> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Skeleton } from '@components/Skeleton'; | ||
import { Flex } from '@components/shared/Flex'; | ||
|
||
import { theme } from '@styles/theme'; | ||
|
||
export const SkeletonChatRoomList = () => ( | ||
<Skeleton | ||
width="100%" | ||
height="12px" | ||
radius="5px" | ||
defaultColor={theme.PALETTE.GRAY_100} | ||
gradientColor={theme.PALETTE.GRAY_200} | ||
> | ||
<Flex direction="column" gap={16}> | ||
{Array(5) | ||
.fill(null) | ||
.map((_, index) => ( | ||
<Flex gap={10} key={index}> | ||
<Skeleton.Item width="40px" height="40px" /> | ||
<Flex direction="column" grow justify="space-between"> | ||
<Flex justify="space-between"> | ||
<Skeleton.Item width="20%" height="14px" /> | ||
<Skeleton.Item width="10%" height="14px" /> | ||
</Flex> | ||
<Skeleton.Item width="75%" /> | ||
</Flex> | ||
</Flex> | ||
))} | ||
</Flex> | ||
</Skeleton> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.