Skip to content

Commit d83bb06

Browse files
committed
used HashLink for id navigation to login and make it smooth
1 parent 5b8ced3 commit d83bb06

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"react-redux": "^7.2.0",
4444
"react-responsive": "^8.0.3",
4545
"react-router-dom": "^5.1.2",
46+
"react-router-hash-link": "^2.2.2",
4647
"react-scripts": "^3.4.0",
4748
"react-shapes": "^0.1.0",
4849
"react-share": "^4.2.1",

src/user/auth/login/login.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import GoogleLogin from "../../../assets/images/icons8-google-48.png";
88
import { FaGithub } from 'react-icons/fa'
99
import { connect } from 'react-redux';
1010
import { getLoginOptions } from '../../../actions/orgAction'
11+
import { HashLink } from 'react-router-hash-link';
1112
import "./login.scss";
1213

1314
class Login extends Component {
@@ -58,9 +59,7 @@ class Login extends Component {
5859
</p>
5960
</div>
6061
<div className="login-btn">
61-
<a href="#login">
62-
Sign In
63-
</a>
62+
<HashLink smooth to="#login">Sign In</HashLink>
6463
</div>
6564
</div>
6665
<div id="login" className="user-details">

0 commit comments

Comments
 (0)