Skip to content

Commit

Permalink
fix: boe avatar url
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Dec 18, 2024
1 parent ea34b41 commit 7e32f25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/ChatBubble/ChatBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import markedLinkifyIt from 'marked-linkify-it';
import markedKatex from 'marked-katex-extension';
import markedExtendedTables from '../../helpers/markedExtendedTables';


marked.use({
async: false,
gfm: true,
Expand Down Expand Up @@ -245,7 +244,9 @@ const ChatBubble: React.FC<Props> = ({
!!message.emitter?.length &&
!!memori.enableBoardOfExperts &&
experts?.find(e => e.name === message.emitter)
? `${apiUrl}/api/v1/memoriai/memori/avatar/${
? `${
new URL(apiUrl ?? '/').origin
}/api/v1/memoriai/memori/avatar/${
experts.find(e => e.name === message.emitter)
?.expertMemoriID
}`
Expand Down
4 changes: 3 additions & 1 deletion src/components/ExpertsDrawer/ExpertsDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const ExpertsDrawer = ({
<li key={expert.expertID} className="memori--experts-drawer--item">
<figure className="memori--experts-drawer--avatar">
<img
src={`${apiUrl}/api/v1/memoriai/memori/avatar/${expert.expertMemoriID}`}
src={`${new URL(apiUrl).origin}/api/v1/memoriai/memori/avatar/${
expert.expertMemoriID
}`}
alt={expert.name}
onError={e => {
e.currentTarget.src = getResourceUrl({
Expand Down

0 comments on commit 7e32f25

Please sign in to comment.