upstream #1
@ -17,7 +17,8 @@ const components = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SocialIcon = ({ kind, href, size = 8 }) => {
|
const SocialIcon = ({ kind, href, size = 8 }) => {
|
||||||
if (!href) return null
|
if (!href || (kind === 'mail' && !/^mailto:\w+([.-]?\w+)@\w+([.-]?\w+)(.\w{2,3})+$/.test(href)))
|
||||||
|
return null
|
||||||
|
|
||||||
const SocialSvg = components[kind]
|
const SocialSvg = components[kind]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user