From 7e32f254a2892396f9f881677e9a5dfe7611888a Mon Sep 17 00:00:00 2001 From: nzambello Date: Wed, 18 Dec 2024 14:59:12 +0200 Subject: [PATCH] fix: boe avatar url --- src/components/ChatBubble/ChatBubble.tsx | 5 +++-- src/components/ExpertsDrawer/ExpertsDrawer.tsx | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/ChatBubble/ChatBubble.tsx b/src/components/ChatBubble/ChatBubble.tsx index 02beb36d..db54d5fe 100644 --- a/src/components/ChatBubble/ChatBubble.tsx +++ b/src/components/ChatBubble/ChatBubble.tsx @@ -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, @@ -245,7 +244,9 @@ const ChatBubble: React.FC = ({ !!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 }` diff --git a/src/components/ExpertsDrawer/ExpertsDrawer.tsx b/src/components/ExpertsDrawer/ExpertsDrawer.tsx index aef702d9..12ad2f6e 100644 --- a/src/components/ExpertsDrawer/ExpertsDrawer.tsx +++ b/src/components/ExpertsDrawer/ExpertsDrawer.tsx @@ -41,7 +41,9 @@ const ExpertsDrawer = ({
  • {expert.name} { e.currentTarget.src = getResourceUrl({