@@ -151,7 +151,7 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
151
151
setCachedTags ( [ ...newValue ] )
152
152
}
153
153
154
- const onSubmit = async ( data : IFormInputs ) => {
154
+ const onSubmit = async ( data : IFormInputs ) => {
155
155
let imageURL
156
156
let filesize
157
157
let filename
@@ -240,15 +240,16 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
240
240
241
241
return (
242
242
< div className = 'relative w-full flex justify-center p-6' >
243
- < form style = { { width : '720px' } } onSubmit = { handleSubmit ( onSubmit , onError ) } >
243
+ < form style = { { width : '720px' } }
244
+ onSubmit = { handleSubmit ( onSubmit , onError ) } >
244
245
< div className = 'inline-flex absolute -top-10 right-2 items-center' >
245
- < Menu as = "div" className = "relative inline-block text-left" >
246
+ < Menu as = "div"
247
+ className = "relative inline-block text-left" >
246
248
< div >
247
249
< Menu . Button className = "px-2 flex items-center" >
248
250
< ExclamationIcon
249
251
className = "w-8 h-8"
250
- aria-hidden = "true"
251
- />
252
+ aria-hidden = "true" />
252
253
</ Menu . Button >
253
254
</ div >
254
255
< Transition
@@ -258,8 +259,7 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
258
259
enterTo = "transform opacity-100 scale-100"
259
260
leave = "transition ease-in duration-75"
260
261
leaveFrom = "transform opacity-100 scale-100"
261
- leaveTo = "transform opacity-0 scale-95"
262
- >
262
+ leaveTo = "transform opacity-0 scale-95" >
263
263
< Menu . Items
264
264
className = "absolute right-0 w-80 mt-2 origin-top-right bg-white divide-y divide-gray-100 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" >
265
265
< div className = "px-6 py-8" >
@@ -294,8 +294,7 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
294
294
setValue ( 'description' , cache )
295
295
trigger ( )
296
296
}
297
- } }
298
- >
297
+ } } >
299
298
{ `Publish${ isSubmitting ? '...' :'' } ` }
300
299
</ button >
301
300
</ div >
@@ -304,41 +303,52 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
304
303
{
305
304
! preview &&
306
305
< div className = "inline-flex bg-gray-200 text-gray-500 rounded-full px-2 cursor-pointer" >
307
- < svg viewBox = "0 0 24 24" className = "w-3" >
306
+ < svg viewBox = "0 0 24 24"
307
+ className = "w-3" >
308
308
< path
309
309
d = "M12 1.5v21M1.5 12h21"
310
310
stroke = "#343F44"
311
311
strokeLinecap = "round"
312
312
strokeLinejoin = "round"
313
313
fill = "none"
314
- fillRule = "evenodd"
315
- />
314
+ fillRule = "evenodd" />
316
315
</ svg >
317
316
< span className = "inline-block p-1 text-sm" >
318
317
Add feature image
319
318
</ span >
320
319
</ div >
321
320
}
322
- < input type = "file" name = "Asset" className = "hidden" { ...register ( "files" ) } />
321
+ < input type = "file"
322
+ name = "Asset"
323
+ className = "hidden"
324
+ { ...register ( "files" ) } />
323
325
{
324
326
preview &&
325
- < img className = "lg:h-48 md:h-36 w-full object-cover object-center cursor-pointer" src = { preview } />
327
+ < img className = "lg:h-48 md:h-36 w-full object-cover object-center cursor-pointer"
328
+ src = { preview } />
326
329
}
327
330
</ label >
328
331
</ div >
329
332
< div className = "pt-12" >
330
333
< TextareaAutosize
331
334
placeholder = "Give a title"
332
- className = "border-0 outline-0 text-5xl w-full resize-none" { ... register ( "name" ) }
333
- />
335
+ className = "border-0 outline-0 text-5xl w-full resize-none"
336
+ { ... register ( "name" ) } />
334
337
</ div >
335
338
< div className = "my-6 mb-4" >
336
339
< div className = "text-gray-800 flex items-center" >
337
340
< div className = "w-8 h-8 rounded-full inline-flex items-center justify-center bg-gray-200 text-gray-400" >
338
- < svg fill = "none" stroke = "currentColor" strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = "2"
339
- className = "w-4 h-4" viewBox = "0 0 24 24" >
341
+ < svg fill = "none"
342
+ stroke = "currentColor"
343
+ strokeLinecap = "round"
344
+ strokeLinejoin = "round"
345
+ strokeWidth = "2"
346
+ className = "w-4 h-4"
347
+ viewBox = "0 0 24 24" >
340
348
< path d = "M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2" />
341
- < circle cx = "12" cy = "7" r = "4" />
349
+ < circle cx = "12"
350
+ cy = "7"
351
+ r = "4" />
342
352
</ svg >
343
353
</ div >
344
354
< span
@@ -353,8 +363,7 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
353
363
}
354
364
placeholder = "Input Authors"
355
365
onChange = { handleAuthorsChange }
356
- options = { authorsInLocal ?? [ ] }
357
- />
366
+ options = { authorsInLocal ?? [ ] } />
358
367
</ div >
359
368
< div className = "pt-3 flex justify-start items-center text-gray-500" >
360
369
< span > Tags:</ span >
@@ -366,13 +375,14 @@ export const Editor = memo<EditorProps>(({ account, article, publishLink, cid })
366
375
placeholder = "Input Post Tags"
367
376
onChange = { handleTagsChange }
368
377
// @ts -ignore
369
- options = { tagsInLocal ?? [ ] }
370
- />
378
+ options = { tagsInLocal ?? [ ] } />
371
379
</ div >
372
380
</ div >
373
381
< Tiptap initValue = { article ?. description } />
374
382
</ form >
375
- < Dialog as = 'div' open = { isOpen } onClose = { ( ) => setIsOpen ( false ) } >
383
+ < Dialog as = 'div'
384
+ open = { isOpen }
385
+ onClose = { ( ) => setIsOpen ( false ) } >
376
386
< Dialog . Overlay />
377
387
378
388
< Dialog . Title > Deactivate account</ Dialog . Title >
0 commit comments