Skip to content

Commit 9bd5fd3

Browse files
committed
Fix scroll
1 parent 4155411 commit 9bd5fd3

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"react-helmet": "^6.1.0",
5959
"react-transition-group": "^4.3.0",
6060
"scrollreveal": "^4.0.5",
61-
"smooth-scroll": "^16.1.0",
6261
"styled-components": "^5.3.0"
6362
},
6463
"devDependencies": {

src/components/layout.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import styled, { ThemeProvider } from 'styled-components';
44
import { Head, Loader, Nav, Social, Email, Footer } from '@components';
55
import { GlobalStyle, theme } from '@styles';
66

7-
// https://medium.com/@chrisfitkin/how-to-smooth-scroll-links-in-gatsby-3dc445299558
8-
if (typeof window !== 'undefined') {
9-
// eslint-disable-next-line global-require
10-
require('smooth-scroll')('a[href*="#"]');
11-
}
12-
137
const StyledContent = styled.div`
148
display: flex;
159
flex-direction: column;

src/styles/GlobalStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const GlobalStyle = createGlobalStyle`
1111
html {
1212
box-sizing: border-box;
1313
width: 100%;
14+
scroll-behavior: smooth;
1415
}
1516
1617
*,

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12281,11 +12281,6 @@ slugify@^1.4.4:
1228112281
resolved "https://registry.npmjs.org/slugify/-/slugify-1.5.1.tgz#ef268872982a3a3b18f213ddee8cd1a28ac7a130"
1228212282
integrity sha512-54gP60qIkxaUCFXORn/u+tNPqdTsqvqonB2nxjQV52wWTCuJJ4kbfU7URkpn8646Lr2T3CSh8ecDzzBK/dD9jA==
1228312283

12284-
smooth-scroll@^16.1.0:
12285-
version "16.1.3"
12286-
resolved "https://registry.npmjs.org/smooth-scroll/-/smooth-scroll-16.1.3.tgz#c5b68194b4186173f9f61065103ae4e26ce36885"
12287-
integrity sha512-ca9U+neJS/cbdScTBuUTCZvUWNF2EuMCk7oAx3ImdeRK5FPm+xRo9XsVHIkeEVkn7MBRx+ufVEhyveM4ZhaTGA==
12288-
1228912284
snapdragon-node@^2.0.1:
1229012285
version "2.1.1"
1229112286
resolved "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"

0 commit comments

Comments
 (0)