catch
This commit is contained in:
@@ -13,6 +13,7 @@ import { useShortcutSaveMutation } from '@/entities/user/api/use-shortcut-save-m
|
||||
import { ShortcutSaveParams, ShortcutSaveResponse } from '@/entities/user/model/types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
|
||||
// 상수 정의
|
||||
const SCROLL_ANIMATION_DURATION = 800;
|
||||
@@ -73,6 +74,11 @@ export const Menu = ({
|
||||
};
|
||||
shortcutSave(params).then((rs: ShortcutSaveResponse) => {
|
||||
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
showAlert(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user