Repository: busyorg/busy
Pull request #658 (2017-08-27 06:36:41)

Add default link
- Add steemit.com as default signup and edit profile link
- Add bookmarks and drafts on top nav right popover
- Make layout bookmarks and settings using same container than drafts


Patch:
diff --git a/src/Wrapper.js b/src/Wrapper.js
index 68a2a414..95ad1083 100644
--- a/src/Wrapper.js
+++ b/src/Wrapper.js
@@ -64,6 +64,12 @@ export default class Wrapper extends React.PureComponent {
       case 'activity':
         this.props.history.push('#activity');
         break;
+      case 'bookmarks':
+        this.props.history.push('/bookmarks');
+        break;
+      case 'drafts':
+        this.props.history.push('/drafts');
+        break;
       case 'settings':
         this.props.history.push('/settings');
         break;
diff --git a/src/app/AppSettings.js b/src/app/AppSettings.js
index 71a9a6a0..dc72111f 100644
--- a/src/app/AppSettings.js
+++ b/src/app/AppSettings.js
@@ -30,7 +30,7 @@ export default class AppSettings extends React.Component {
   render() {
     const { setLocale } = this.props;
     return (
-      <div className="main-panel">
+      <div className="shifted">
         <div className="container">
           <h1>
             <FormattedMessage id="settings" defaultMessage="Settings" />
diff --git a/src/bookmarks/Bookmarks.js b/src/bookmarks/Bookmarks.js
index d53c73a6..d75e6fdb 100644
--- a/src/bookmarks/Bookmarks.js
+++ b/src/bookmarks/Bookmarks.js
@@ -45,8 +45,8 @@ export default class Bookmarks extends React.Component {
     const loadMoreContentAction = () => null;
 
     return (
-      <div className="main-panel">
-        <div className="my-5">
+      <div className="shifted">
+        <div className="container">
           <h1 className="text-center">
             <FormattedMessage id="bookmarks" defaultMessage="Bookmarks" />
           </h1>
diff --git a/src/components/Hero.js b/src/components/Hero.js
index 6706a167..f37d6563 100644
--- a/src/components/Hero.js
+++ b/src/components/Hero.js
@@ -1,5 +1,4 @@
 import React from 'react';
-import { Link } from 'react-router-dom';
 import { FormattedMessage } from 'react-intl';
 import './Hero.less';
 
@@ -9,11 +8,11 @@ const Hero = () =>
       <h1 className="hero-message">
         <FormattedMessage id="hero" defaultMessage="Ensuring compensation for the creators of value" />
       </h1>
-      <Link to="/signup">
+      <a target="_blank" rel="noopener noreferrer" href="https://steemit.com/pick_account">
         <button className="ant-btn-lg hero-signup">
           <FormattedMessage id="signup" defaultMessage="Sign up" />
         </button>
-      </Link>
+      </a>
     </div>
   </div>);
 
diff --git a/src/components/Navigation/Topnav.js b/src/components/Navigation/Topnav.js
index 8472db35..f83f2506 100644
--- a/src/components/Navigation/Topnav.js
+++ b/src/components/Navigation/Topnav.js
@@ -76,6 +76,12 @@ const Topnav = ({
                   <PopoverMenuItem key="activity">
                     <FormattedMessage id="activity" defaultMessage="Activity" />
                   </PopoverMenuItem>
+                  <PopoverMenuItem key="bookmarks">
+                    <FormattedMessage id="bookmarks" defaultMessage="Bookmarks" />
+                  </PopoverMenuItem>
+                  <PopoverMenuItem key="drafts">
+                    <FormattedMessage id="drafts" defaultMessage="Drafts" />
+                  </PopoverMenuItem>
                   <PopoverMenuItem key="settings">
                     <FormattedMessage id="settings" defaultMessage="Settings" />
                   </PopoverMenuItem>
@@ -96,9 +102,9 @@ const Topnav = ({
       <div className="Topnav__menu-container">
         <Menu className="Topnav__menu-container__menu" mode="horizontal">
           <Menu.Item key="signup">
-            <Link to="#signup">
+            <a target="_blank" rel="noopener noreferrer" href="https://steemit.com/pick_account">
               <FormattedMessage id="signup" defaultMessage="Sign up" />
-            </Link>
+            </a>
           </Menu.Item>
           <Menu.Item key="divider" disabled>
             |
diff --git a/src/components/Sidebar/SignUp.js b/src/components/Sidebar/SignUp.js
index 0e9d2f8c..da6b0a9d 100644
--- a/src/components/Sidebar/SignUp.js
+++ b/src/components/Sidebar/SignUp.js
@@ -1,6 +1,5 @@
 import React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import './SignUp.less';
 
 const SignUp = () =>
@@ -8,11 +7,11 @@ const SignUp = () =>
     <h3 className="SignUp__title">
       <FormattedMessage id="new_to_busy" defaultMessage="New to Busy?" />
     </h3>
-    <Link to="#signup">
+    <a target="_blank" rel="noopener noreferrer" href="https://steemit.com/pick_account">
       <button className="SignUp__button">
         <FormattedMessage id="signup" defaultMessage="Sign up" />
       </button>
-    </Link>
+    </a>
   </div>);
 
 export default SignUp;
diff --git a/src/components/UserHeader.js b/src/components/UserHeader.js
index ed7ee51e..32e1cd14 100644
--- a/src/components/UserHeader.js
+++ b/src/components/UserHeader.js
@@ -37,7 +37,9 @@ const UserHeader = ({
           <div className="UserHeader__user__button">
             {authenticated &&
               (isSameUser
-                ? <Action small text={intl.formatMessage({ id: 'edit_profile', defaultMessage: 'Editr profile' })} />
+                ? <a target="_blank" rel="noopener noreferrer" href={`https://steemit.com/@${handle}/settings`}>
+                  <Action small text={intl.formatMessage({ id: 'edit_profile', defaultMessage: 'Edit profile' })} />
+                </a>
                 : <FollowButton username={username} />)
             }
           </div>


Test patch:
diff --git a/src/stories/__snapshots__/stories.test.js.snap b/src/stories/__snapshots__/stories.test.js.snap
index cf628e8b..a7b8c295 100644
--- a/src/stories/__snapshots__/stories.test.js.snap
+++ b/src/stories/__snapshots__/stories.test.js.snap
@@ -795,8 +795,9 @@ exports[`Storyshots Navigation Topnav unlogged 1`] = `
               title={undefined}
             >
               <a
-                href="#signup"
-                onClick={[Function]}
+                href="https://steemit.com/pick_account"
+                rel="noopener noreferrer"
+                target="_blank"
               >
                 <span>
                   Sign up