Skip to content

Commit

Permalink
Merge pull request #1535 from 42organization/Bug/#1522-team-detail-bug
Browse files Browse the repository at this point in the history
[Bug] 팀 상세 페이지 토스트 에러 #1522
  • Loading branch information
JeongRon authored Sep 3, 2024
2 parents b4f8ce1 + dfdb3fa commit 6e94178
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/agenda/teamDetail/TeamButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion hooks/useAxiosWithToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function useAxiosWithToast(instance: AxiosInstance) {
setSnackbar({
toastName: `response default`,
severity: 'success',
message: `${message || '성공했습니다.'}'`,
message: `${message} 👍`,
clicked: true,
});
}
Expand Down
2 changes: 1 addition & 1 deletion pages/agenda/[agendaKey]/[teamUID]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
8 changes: 6 additions & 2 deletions utils/agenda/getAgendaSnackBarInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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: '성공했습니다.' };
}
}

0 comments on commit 6e94178

Please sign in to comment.