@@ -107,13 +107,15 @@ export function DefaultNumber({ index }: NumberProps) {
107107 </ div >
108108 ) }
109109 </ div >
110- < span className = 'absolute -right-3 top-0 z-10' >
111- < Icon
112- icon = 'ep:remove-filled'
113- className = 'h-8 w-8 text-secondary cursor-pointer'
114- onClick = { ( ) => deleteContent ( index , contentState , dispatchContent ) }
115- />
116- </ span >
110+ { contentState . postContent . length >= 2 && (
111+ < span className = 'absolute -right-3 top-0 z-10' >
112+ < Icon
113+ icon = 'ep:remove-filled'
114+ className = 'h-8 w-8 text-secondary cursor-pointer'
115+ onClick = { ( ) => deleteContent ( index , contentState , dispatchContent ) }
116+ />
117+ </ span >
118+ ) }
117119 </ div >
118120 ) ;
119121}
@@ -186,13 +188,15 @@ export function NumberOne({ index }: NumberProps) {
186188 </ p >
187189 </ div >
188190 </ div >
189- < span className = 'absolute -right-3 top-0 z-10' >
190- < Icon
191- icon = 'ep:remove-filled'
192- className = 'h-8 w-8 text-secondary cursor-pointer'
193- onClick = { ( ) => deleteContent ( index , contentState , dispatchContent ) }
194- />
195- </ span >
191+ { contentState . postContent . length >= 2 && (
192+ < span className = 'absolute -right-3 top-0 z-10' >
193+ < Icon
194+ icon = 'ep:remove-filled'
195+ className = 'h-8 w-8 text-secondary cursor-pointer'
196+ onClick = { ( ) => deleteContent ( index , contentState , dispatchContent ) }
197+ />
198+ </ span >
199+ ) }
196200 </ div >
197201 ) ;
198202}
0 commit comments