File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const ERROR_MESSAGE = {
42
42
43
43
const SUCCESS_MESSAGE = {
44
44
CREATE_POST : '글이 작성되었습니다.' ,
45
+ DELETE_STUDYLOG : '글이 삭제되었습니다.' ,
45
46
CREATE_ABILITY : '역량을 추가했습니다.' ,
46
47
EDIT_ABILITY : '역량을 수정했습니다.' ,
47
48
DELETE_ABILITY : '역량을 삭제했습니다.' ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
29
29
PATH ,
30
30
SNACKBAR_MESSAGE ,
31
31
} from '../../constants' ;
32
+ import { SUCCESS_MESSAGE } from '../../constants/message' ;
32
33
33
34
const StudylogPage = ( ) => {
34
35
const { id } = useParams ( ) ;
@@ -49,6 +50,10 @@ const StudylogPage = () => {
49
50
return requestDeleteStudylog ( { id, accessToken } ) ;
50
51
} ,
51
52
{
53
+ onSuccess : ( ) => {
54
+ openSnackBar ( SUCCESS_MESSAGE . DELETE_STUDYLOG ) ;
55
+ history . push ( PATH . STUDYLOG ) ;
56
+ } ,
52
57
onError : ( error ) => {
53
58
alert ( ERROR_MESSAGE [ error . code ] ?? ALERT_MESSAGE . FAIL_TO_DELETE_STUDYLOG ) ;
54
59
} ,
You can’t perform that action at this time.
0 commit comments