mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
13 lines
396 B
JavaScript
13 lines
396 B
JavaScript
export const handleEmailClick = (e, emailIcon, CONTACT_EMAIL) => {
|
|
if (CONTACT_EMAIL && emailIcon && !emailIcon.current.href) {
|
|
e.preventDefault()
|
|
try {
|
|
const email = decodeURIComponent(escape(atob(CONTACT_EMAIL)))
|
|
emailIcon.current.href = `mailto:${email}`
|
|
emailIcon.current.click()
|
|
} catch (error) {
|
|
console.error('解密邮箱失败:', error)
|
|
}
|
|
}
|
|
}
|