From dfdb3fa75602fe1c94c352adb51d541faacbcbc8 Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Tue, 3 Sep 2024 14:07:47 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=ED=8C=80=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - team/cancel => team/drop 으로 변경 - team/drop 토스트 메시지 추가 --- components/agenda/teamDetail/TeamButtons.tsx | 2 +- hooks/useAxiosWithToast.ts | 2 +- pages/agenda/[agendaKey]/[teamUID]/index.tsx | 2 +- utils/agenda/getAgendaSnackBarInfo.ts | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/agenda/teamDetail/TeamButtons.tsx b/components/agenda/teamDetail/TeamButtons.tsx index 212a2ce4d..b87d5c2a4 100644 --- a/components/agenda/teamDetail/TeamButtons.tsx +++ b/components/agenda/teamDetail/TeamButtons.tsx @@ -76,7 +76,7 @@ const TeamButtons = ({ label: '팀 나가기', description: '확인 버튼을 누르면, 팀에서 나가게 됩니다.', onProceed: () => - manageTeamDetail && manageTeamDetail('PATCH', 'team/cancel'), + manageTeamDetail && manageTeamDetail('PATCH', 'team/drop'), }); } else if (authority === Authority.LEADER) { return renderButton( diff --git a/hooks/useAxiosWithToast.ts b/hooks/useAxiosWithToast.ts index 92338c1c0..16e7b0f7a 100644 --- a/hooks/useAxiosWithToast.ts +++ b/hooks/useAxiosWithToast.ts @@ -87,7 +87,7 @@ export default function useAxiosWithToast(instance: AxiosInstance) { setSnackbar({ toastName: `response default`, severity: 'success', - message: `${message || '성공했습니다.'}'`, + message: `${message} 👍`, clicked: true, }); } diff --git a/pages/agenda/[agendaKey]/[teamUID]/index.tsx b/pages/agenda/[agendaKey]/[teamUID]/index.tsx index 9f9652e71..bf3c5653e 100644 --- a/pages/agenda/[agendaKey]/[teamUID]/index.tsx +++ b/pages/agenda/[agendaKey]/[teamUID]/index.tsx @@ -61,7 +61,7 @@ export default function TeamDetail() { const sendRequest = useFetchRequest().sendRequest; const shareTeamInfo = () => { - alert('공유하기'); + alert('링크가 복사되었습니다.'); const url = window.location.href; navigator.clipboard.writeText(url); }; diff --git a/utils/agenda/getAgendaSnackBarInfo.ts b/utils/agenda/getAgendaSnackBarInfo.ts index a639af4a3..4bb6d0f8b 100644 --- a/utils/agenda/getAgendaSnackBarInfo.ts +++ b/utils/agenda/getAgendaSnackBarInfo.ts @@ -62,9 +62,13 @@ export default function getAgendaSnackBarInfo( severity: 'info', message: '팀이 폭파되었습니다.', }, + '/team/drop': { + severity: 'info', + message: '팀에서 나갔습니다.', + }, '/team/confirm': { severity: 'success', - message: '대회 정보가 성공적으로 확정되었습니다.', + message: '팀이 성공적으로 확정되었습니다.', }, '/ticket': { severity: 'success', @@ -77,6 +81,6 @@ export default function getAgendaSnackBarInfo( if (result) { return { severity: result.severity, message: result.message }; } else { - return { severity: 'default', message: '뭔진 모르겠지만 성공!.' }; + return { severity: 'default', message: '성공했습니다.' }; } }