about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/drawer/account/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/features/drawer/account/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/drawer/account/index.js25
1 files changed, 15 insertions, 10 deletions
diff --git a/app/javascript/flavours/glitch/features/drawer/account/index.js b/app/javascript/flavours/glitch/features/drawer/account/index.js
index 168d0c2cf..552848641 100644
--- a/app/javascript/flavours/glitch/features/drawer/account/index.js
+++ b/app/javascript/flavours/glitch/features/drawer/account/index.js
@@ -12,6 +12,7 @@ import Permalink from 'flavours/glitch/components/permalink';
 
 //  Utils.
 import { hiddenComponent } from 'flavours/glitch/util/react_helpers';
+import { profileLink } from 'flavours/glitch/util/backend_links';
 
 //  Messages.
 const messages = defineMessages({
@@ -28,12 +29,14 @@ export default function DrawerAccount ({ account }) {
   if (!account) {
     return (
       <div className='drawer--account'>
-        <a
-          className='edit'
-          href='/settings/profile'
-        >
-          <FormattedMessage {...messages.edit} />
-        </a>
+        { profileLink !== undefined && (
+          <a
+            className='edit'
+            href={ profileLink }
+          >
+            <FormattedMessage {...messages.edit} />
+          </a>
+        )}
       </div>
     );
   }
@@ -59,10 +62,12 @@ export default function DrawerAccount ({ account }) {
       >
         <strong>@{account.get('acct')}</strong>
       </Permalink>
-      <a
-        className='edit'
-        href='/settings/profile'
-      ><FormattedMessage {...messages.edit} /></a>
+      { profileLink !== undefined && (
+        <a
+          className='edit'
+          href={ profileLink }
+        ><FormattedMessage {...messages.edit} /></a>
+      )}
     </div>
   );
 }