Compare commits
No commits in common. 'b61cbadd15a26280a90ab235aa675641bf790885' and '4d3825dbeefe3a214f09eed5d65e24da47c24fe5' have entirely different histories.
b61cbadd15
...
4d3825dbee
@ -1,22 +0,0 @@ |
||||
import React, { useState, useEffect } from "react"; |
||||
|
||||
const HiddenEmail = ({ |
||||
email, |
||||
alt, |
||||
althref, |
||||
}: { |
||||
email: string; |
||||
alt: string; |
||||
althref: string; |
||||
}) => { |
||||
const [visible, setVisible] = useState(false); |
||||
useEffect(() => { |
||||
setVisible(true); |
||||
}, []); |
||||
|
||||
return ( |
||||
<a href={visible ? `mailto:${email}` : althref}>{visible ? email : alt}</a> |
||||
); |
||||
}; |
||||
|
||||
export default HiddenEmail; |
Loading…
Reference in new issue