fix: verify validation url and email (#60)

* fix: verify validation url and email

* chore: disable one expect

* fix: lint issue

* fix: fix lint
This commit is contained in:
Juan Picado @jotadeveloper
2019-05-16 07:25:40 -07:00
committed by GitHub
parent 233ba196a0
commit 980dac5b2f
9 changed files with 144 additions and 82 deletions

View File

@@ -12,6 +12,7 @@ import Tooltip from '@material-ui/core/Tooltip/index';
import { DetailContextConsumer } from '../../pages/version/index';
import { Fab, ActionListItem } from './styles';
import { isURL } from '../../utils/url';
const ACTIONS = {
homepage: {
@@ -40,9 +41,6 @@ class ActionBar extends Component<any, any> {
}
renderIconsWithLink(link, component) {
if (!link) {
return null;
}
return (
<a href={link} target={'_blank'}>
{component}
@@ -61,7 +59,7 @@ class ActionBar extends Component<any, any> {
const renderList = Object.keys(actionsMap).reduce((component, value, key) => {
const link = actionsMap[value];
if (link) {
if (link && isURL(link)) {
const fab = <Fab size={'small'}>{ACTIONS[value]['icon']}</Fab>;
component.push(
<Tooltip key={key} title={ACTIONS[value]['title']}>