File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,21 @@ function ProfilePreview(props: {
8484 const { user} = profile
8585 // const currentUser = useUser()
8686
87+ let bio = profile . bio as JSONContent ;
88+
89+ if ( bio && bio . content ) {
90+ // Convert heading and list to paragraph
91+ bio . content = bio . content ?. map ( c => {
92+ if ( c . type === 'heading' || c . type === 'list' ) {
93+ return {
94+ type : 'paragraph' ,
95+ content : c . content
96+ }
97+ }
98+ return c
99+ } )
100+ }
101+
87102 return (
88103 < Link
89104 onClick = { ( ) => track ( 'click love profile preview' ) }
@@ -135,7 +150,7 @@ function ProfilePreview(props: {
135150 </ h3 >
136151 < div className = "text-sm text-gray-500 dark:text-gray-400" >
137152 { /*TODO: fix nested <a> links warning (one from Link above, one from link in bio below)*/ }
138- < Content className = "w-full line-clamp-4" content = { profile . bio as JSONContent } />
153+ < Content className = "w-full line-clamp-4" content = { bio } />
139154 </ div >
140155 { /*{age}*/ }
141156 </ div >
You can’t perform that action at this time.
0 commit comments