Skip to content

Commit

Permalink
[Bug] 공유버튼 URL이 잘못 작성된 것 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
contemplation-person committed Apr 8, 2024
1 parent 218bce5 commit 5966c31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/party/roomDetail/PartyDetailButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ function ReportNoShow({ roomId, userIntraId }: ParytButtonProps) {
}

function ShareRoom() {
const roomId = useRouter().query.roomId;
const setSnackbar = useSetRecoilState(toastState);
const shareUrl = `${process.env.NEXT_PUBLIC_CLIENT_ENDPOINT}${
useRouter().asPath
}`;

return (
<button
className={styles.shareBtn}
onClick={() => {
navigator.clipboard.writeText(
`${process.env.NEXT_PUBLIC_SERVER_ENDPOINT}/party/${roomId}`
);
navigator.clipboard.writeText(shareUrl);
setSnackbar({
toastName: 'clip board',
message: '주소가 복사되었습니다.',
Expand Down

0 comments on commit 5966c31

Please sign in to comment.