summaryrefslogtreecommitdiff
path: root/frontend/views/page/components
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-11 17:23:12 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-11 17:23:12 +0200
commit88b5644a6c2594887d6f99f1cad72a1b58d60fe4 (patch)
treece1dbe06e7bc202a08c7fdeb8fb147bdd6e593bd /frontend/views/page/components
parentcf204a1567bcfc6cdfd1927cd9e897b7334abe16 (diff)
more fixes
Diffstat (limited to 'frontend/views/page/components')
-rw-r--r--frontend/views/page/components/tile.handle.js36
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