Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/pages/MyPage/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { formatDate } from "@utils/dateUtil";
import QRCode from "react-qr-code";
import PageHeader from "@components/PageHeader/PageHeader";
import { formatPhoneNumber } from "@utils/numberUtil";
import { toast } from "react-toastify";

function MyPage() {
const { user } = useUserStore();
Expand Down Expand Up @@ -50,10 +51,10 @@ function MyPage() {
url: newUrl,
})
.then(() => {
alert("수정되었습니다.");
toast.success("수정되었습니다.");
})
.catch((err) => {
alert("수정 실패: " + err.response?.data?.message);
toast.error("수정 실패: " + err.response?.data?.message);
});
};

Expand Down Expand Up @@ -261,9 +262,9 @@ function MyPage() {
navigator.clipboard.writeText(
`https://zip-line.kr/${user?.url}`
);
alert("URL이 복사되었습니다.");
toast("URL이 복사되었습니다.");
} else {
alert("복사할 URL이 없습니다.");
toast.error("복사할 URL이 없습니다.");
}
}}
sx={{ minWidth: "40px", height: "40px" }}
Expand Down