Skip to content

Commit

Permalink
feat: add markdown support for user description
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Aug 19, 2024
1 parent 2083b24 commit bc1dd57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/features/users/user-title.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useParams } from 'next/navigation';
import MaterialSymbolsSecurity from '~icons/material-symbols/security';
import MaterialSymbolsShieldPerson from '~icons/material-symbols/shield-person';

import MDViewer from '@/components/markdown/viewer/MD-viewer';
import H3 from '@/components/typography/h3';
import P from '@/components/typography/p';
import {
Expand Down Expand Up @@ -53,9 +54,12 @@ const UserTitle = () => {
)}
</div>
{user.description && (
<P className="line-clamp-4 text-sm text-muted-foreground">
<MDViewer
disableSpoiler
className="line-clamp-4 text-sm text-muted-foreground"
>
{user.description}
</P>
</MDViewer>
)}
</div>
);
Expand Down

0 comments on commit bc1dd57

Please sign in to comment.