Skip to content

Commit

Permalink
fix: ChatMembers user avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
levanion committed Sep 27, 2023
1 parent 2a2550a commit 1903ea0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/ui/src/modals/AIChatModal/components/ChatHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const ChatHistory = () => {
<StyledRoot>
{(agentById || teamById) && (
<StyledMembersWrapper>
<ChatMembers agentById={agentById} teamOfAgents={teamById} />
<ChatMembers agentById={agentById} teamOfAgents={teamById} isHistory />
</StyledMembersWrapper>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import MemberText from './components/MemberText'
const ChatMembers = ({
agentById,
teamOfAgents,
userName,
isHistory,
}: {
agentById?: any
teamOfAgents?: any
userName?: string
isHistory?: boolean
}) => {
const { user } = React.useContext(AuthContext)

Expand Down Expand Up @@ -57,10 +57,10 @@ const ChatMembers = ({
<TabsContext activeTabId={activeTab}>
<TabPanels noAnimation>
<TabPanel>
{userName && (
{!isHistory && user?.name && (
<StyledAgentWrapper>
<AvatarGenerator name={userName} size={30} />
<MemberText name={userName} />
<AvatarGenerator name={user.name} size={30} avatar={user.avatar} />
<MemberText name={user.name} />
</StyledAgentWrapper>
)}

Expand Down Expand Up @@ -129,10 +129,10 @@ const ChatMembers = ({
<TabsContext activeTabId={activeTab}>
<TabPanels noAnimation>
<TabPanel>
{userName && (
{!isHistory && user?.name && (
<StyledAgentWrapper>
<AvatarGenerator name={userName} size={30} />
<MemberText name={userName} />
<AvatarGenerator name={user.name} size={30} avatar={user.avatar} />
<MemberText name={user.name} />
</StyledAgentWrapper>
)}

Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/modals/AIChatModal/components/ChatV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const ChatV2 = ({ isPrivate = false }: ChatV2Props) => {
return (
<StyledWrapper>
<StyledMembersWrapper>
<ChatMembers agentById={agentById} teamOfAgents={teamOfAgents} userName={user.name} />
<ChatMembers agentById={agentById} teamOfAgents={teamOfAgents} />
</StyledMembersWrapper>

<StyledMessages>
Expand Down

0 comments on commit 1903ea0

Please sign in to comment.