Skip to content

Commit

Permalink
Merge pull request #1033 from 42organization/GGFE-274-관리자-피드백완료-알림-토스…
Browse files Browse the repository at this point in the history
…트메세지-설정

[GGFE-274] 관리자 피드백 완료 유저 알림 토스트 설정
  • Loading branch information
PHJoon authored Sep 19, 2023
2 parents 0aa922a + dfb58ef commit e8556a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/modal/admin/AdminFeedbackCheckModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useSetRecoilState } from 'recoil';
import { IoSend } from 'react-icons/io5';
import { instanceInManage } from 'utils/axios';
import { modalState } from 'utils/recoil/modal';
import { toastState } from 'utils/recoil/toast';
import styles from 'styles/admin/modal/AdminFeedbackCheck.module.scss';

interface IfeedbackProps {
Expand All @@ -16,6 +17,7 @@ export default function AdminFeedbackCheck({
isSolved,
}: IfeedbackProps) {
const setModal = useSetRecoilState(modalState);
const setSnackBar = useSetRecoilState(toastState);

const sendNotificationHandler = async (isSend: boolean) => {
try {
Expand All @@ -29,6 +31,12 @@ export default function AdminFeedbackCheck({
: '피드백이 반영되었습니다.',
// sendMail: isSend, todo: 슬랙으로 보내는 것으로 변경
});
setSnackBar({
toastName: 'noti user',
severity: 'success',
message: `알림이 성공적으로 전송되었습니다!`,
clicked: true,
});
setModal({ modalName: null });
} catch (e) {
console.error('SW03');
Expand Down

0 comments on commit e8556a3

Please sign in to comment.