-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…일자를-기준으로-그룹화하여-보여주기 Feature/fe/#541 채팅 기록 생성일자를 기준으로 그룹화하여 보여주기
- Loading branch information
Showing
5 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
26 changes: 23 additions & 3 deletions
26
frontend/src/components/aiChatPage/ChatLogContainer/ChatLogList/ChatLogGroup.tsx
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 |
---|---|---|
@@ -1,5 +1,25 @@ | ||
interface ChatLogGroupProps {} | ||
import { ChatLogItem } from './ChatLogItem'; | ||
|
||
export function ChatLogGroup({}: ChatLogGroupProps) { | ||
return <ul className="flex flex-col gap-12"></ul>; | ||
interface ChatLogGroupProps { | ||
date: string; | ||
rooms: { | ||
id: string; | ||
title: string; | ||
createdAt: string; | ||
}[]; | ||
} | ||
|
||
export function ChatLogGroup({ date, rooms }: ChatLogGroupProps) { | ||
return ( | ||
<ul className="flex flex-col gap-12"> | ||
{date} | ||
{rooms.map(({ id, title }) => ( | ||
<ChatLogItem | ||
key={id} | ||
id={id} | ||
title={title} | ||
/> | ||
))} | ||
</ul> | ||
); | ||
} |
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
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