File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/page/todo/lowerTodo/hook Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { ALERT, GOAL_COUNT } from '../constants';
44import { extractTitles , formatAiRecommendTitles } from '../utils/goal' ;
55
66import AiRecommendModal from '@/common/component/AiRecommendModal/AiRecommendModal' ;
7+ import AiFailModal from '@/common/component/AiFailModal/AiFailModal' ;
78import { useOverlayModal } from '@/common/hook/useOverlayModal' ;
89import { usePostAiRecommendNewSubGoal } from '@/api/domain/lowerTodo/hook' ;
910
@@ -152,7 +153,8 @@ export const useLowerTodoAI = ({
152153 openModal ( aiModalContent ) ;
153154 } catch ( error ) {
154155 const message = getServerMessage ( error , ALERT . aiFetchFail ) ;
155- alert ( message ) ;
156+ const failModalContent = < AiFailModal onClose = { closeModal } message = { message } /> ;
157+ openModal ( failModalContent ) ;
156158 } finally {
157159 updateAiUsed ( ) ;
158160 }
You can’t perform that action at this time.
0 commit comments