about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-12-21 08:30:22 -0500
committerGitHub <noreply@github.com>2017-12-21 08:30:22 -0500
commitbc0152974f3b9ce9340b04c0356a2f9a72ea99ec (patch)
tree5ceca692fbd368e2201bbd99994521d0639105d5 /app
parent4d34b3495df0c915d8a80978d62d8d42e1e2f307 (diff)
parentdbd5f8b9a5dd3b5686a250ca2c45fe257131b9eb (diff)
Merge pull request #276 from glitch-soc/245-click-avatar-to-open-profile-in-new-tab
Wrap <Avatar> in account header in a link to that account's page (fixes #245)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/flavours/glitch/features/account/components/header.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js
index f5ecaae71..1a258c7e4 100644
--- a/app/javascript/flavours/glitch/features/account/components/header.js
+++ b/app/javascript/flavours/glitch/features/account/components/header.js
@@ -63,7 +63,15 @@ export default class Header extends ImmutablePureComponent {
       <div className='account__header__wrapper'>
         <div className='account__header' style={{ backgroundImage: `url(${account.get('header')})` }}>
           <div>
-            <Avatar account={account} size={90} />
+            <a
+                href={account.get('url')}
+                className='account__header__avatar'
+                role='presentation'
+                target='_blank'
+                rel='noopener'
+            >
+              <Avatar account={account} size={90} />
+            </a>
 
             <span className='account__header__display-name' dangerouslySetInnerHTML={{ __html: displayName }} />
             <span className='account__header__username'>@{account.get('acct')} {account.get('locked') ? <i className='fa fa-lock' /> : null}</span>