tootlab-mastodon/app/javascript/mastodon/components/account_bio.tsx
Eugen Rochko e89317d4c1
Add hover cards in web UI (#30754)
Co-authored-by: Renaud Chaput <renchap@gmail.com>
2024-06-26 19:33:38 +00:00

21 lines
429 B
TypeScript

import { useLinks } from 'mastodon/../hooks/useLinks';
export const AccountBio: React.FC<{
note: string;
className: string;
}> = ({ note, className }) => {
const handleClick = useLinks();
if (note.length === 0 || note === '<p></p>') {
return null;
}
return (
<div
className={`${className} translate`}
dangerouslySetInnerHTML={{ __html: note }}
onClickCapture={handleClick}
/>
);
};