Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcho committed Dec 10, 2024
1 parent c7903de commit 74f232f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
27 changes: 12 additions & 15 deletions src/components/ParsedBotMessageBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const TokensBody = lazy(() => import('./TokensBody'));

type Props = {
text: string;
tokens?: Token[];
tokens: Token[];
sources?: Source[];
};

Expand All @@ -29,18 +29,15 @@ const TextContainer = styled.div`
export default function ParsedBotMessageBody(props: Props) {
const { tokens, sources } = props;

if (tokens && tokens.length > 0) {
return (
<Suspense
fallback={
<TextContainer className="sendbird-word" style={{ borderRadius: 16 }}>
Loading markdown renderer...
</TextContainer>
}
>
<TokensBody tokens={tokens} sources={sources} />
</Suspense>
);
}
return null;
return (
<Suspense
fallback={
<TextContainer className="sendbird-word" style={{ borderRadius: 16 }}>
Loading markdown renderer...
</TextContainer>
}
>
<TokensBody tokens={tokens} sources={sources} />
</Suspense>
);
}
2 changes: 1 addition & 1 deletion src/components/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ h6 {

.widget-markdown code {
border-radius: 0.25rem;
font-size: 12.3px; /* 0.875em */
font-size: 0.875em; // 12.3px; /* 0.875em */
font-weight: 500;
padding: 2.4px 4.8px; /* 0.15rem 0.3rem */
background-color: var(--sb-on-bg-4);
Expand Down

0 comments on commit 74f232f

Please sign in to comment.