feat: add notice when sharing private links in MemoDetail (#2942)

This commit is contained in:
Brilliant Hanabi 2024-02-09 09:30:01 +08:00 committed by GitHub
parent 60efd3ac32
commit 81aa9b107f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,7 +101,11 @@ const MemoDetail = () => {
const handleCopyLinkBtnClick = () => {
copy(`${window.location.origin}/m/${memo.name}`);
toast.success(t("message.succeed-copy-link"));
if (memo.visibility !== Visibility.PUBLIC) {
toast.success(t("message.succeed-copy-link-not-public"));
} else {
toast.success(t("message.succeed-copy-link"));
}
};
const handleCommentCreated = async (commentId: number) => {