diff --git a/web/components/editor/mention.tsx b/web/components/editor/mention.tsx index 22375620..2801e2e5 100644 --- a/web/components/editor/mention.tsx +++ b/web/components/editor/mention.tsx @@ -14,9 +14,13 @@ const MentionComponent = (props: any) => { const contract = useContract(props.node.attrs.id) return ( - - {/* */} - {contract && } + + {contract && ( + + )} ) } @@ -30,5 +34,8 @@ export const DisplayMention = Mention.extend({ parseHTML: () => [{ tag: name }], renderHTML: ({ HTMLAttributes }) => [name, mergeAttributes(HTMLAttributes)], addNodeView: () => - ReactNodeViewRenderer(MentionComponent, { className: 'inline-block' }), + ReactNodeViewRenderer(MentionComponent, { + // On desktop, render cards below half-width so you can stack two + className: 'inline-block sm:w-[calc(50%-1rem)] sm:mr-1', + }), })