diff options
Diffstat (limited to 'frontend/views/page/components/tile.handle.js')
| -rw-r--r-- | frontend/views/page/components/tile.handle.js | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/frontend/views/page/components/tile.handle.js b/frontend/views/page/components/tile.handle.js index bd47ae9..33243a7 100644 --- a/frontend/views/page/components/tile.handle.js +++ b/frontend/views/page/components/tile.handle.js @@ -68,17 +68,31 @@ const TileHandle = ({ tile, bounds, box, viewing, onMouseDown, onDoubleClick }) break } if (viewing && tile.href) { - return ( - <Link to={tile.href}> - <div - className={className} - onMouseDown={onMouseDown} - style={style} - > - {content} - </div> - </Link> - ) + if (tile.href.indexOf('http') === 0) { + return ( + <a href={tile.href} rel='noopener'> + <div + className={className} + onMouseDown={onMouseDown} + style={style} + > + {content} + </div> + </a> + ) + } else { + return ( + <Link to={tile.href}> + <div + className={className} + onMouseDown={onMouseDown} + style={style} + > + {content} + </div> + </Link> + ) + } } else { return ( <div |
