File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
velog-frontend/src/containers/write Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,20 @@ class SubmitBoxContainer extends Component<Props> {
240
240
return categories . filter ( c => c . active ) . map ( c => c . id ) ;
241
241
} ) ( ) ;
242
242
243
+ if ( ! title ) {
244
+ BaseActions . showToast ( {
245
+ type : 'error' ,
246
+ message : '제목을 입력해주세요' ,
247
+ } ) ;
248
+ return ;
249
+ }
250
+ if ( ! body ) {
251
+ BaseActions . showToast ( {
252
+ type : 'error' ,
253
+ message : '내용을 입력해주세요' ,
254
+ } ) ;
255
+ return ;
256
+ }
243
257
try {
244
258
if ( ! postData ) {
245
259
await WriteActions . writePost ( {
@@ -277,7 +291,10 @@ class SubmitBoxContainer extends Component<Props> {
277
291
message : '포스트가 임시저장 되었습니다' ,
278
292
} ) ;
279
293
} catch ( e ) {
280
- console . log ( e ) ;
294
+ BaseActions . showToast ( {
295
+ type : 'error' ,
296
+ message : '임시저장 실패' ,
297
+ } ) ;
281
298
}
282
299
} ;
283
300
@@ -369,7 +386,7 @@ class SubmitBoxContainer extends Component<Props> {
369
386
body = { body }
370
387
meta = { meta }
371
388
urlSlug = { urlSlug }
372
- username = { username }
389
+ username = { username || '' }
373
390
realMeta = { postData && postData . meta }
374
391
onChangeCodeTheme = { onChangeCodeTheme }
375
392
onChangeShortDescription = { onChangeShortDescription }
You can’t perform that action at this time.
0 commit comments