@ -1,3 +1,3 @@
|
||||
export const Route = {
|
||||
IndexPage: '/',
|
||||
}
|
||||
export const ROUTE = {
|
||||
INDEX_PAGE: '/',
|
||||
};
|
||||
|
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 360 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 281 KiB |
After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -1,18 +0,0 @@
|
||||
import isSmoothScrollSupported from '@utils/isSmoothScrollSupported';
|
||||
|
||||
const useSmoothScroll = () => {
|
||||
return id => e => {
|
||||
if (!isSmoothScrollSupported()) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
document.querySelector('#' + id).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start',
|
||||
inline: 'nearest',
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export default useSmoothScroll;
|
@ -1,4 +0,0 @@
|
||||
const isSmoothScrollSupported = () =>
|
||||
'scrollBehavior' in document.documentElement.style;
|
||||
|
||||
export default isSmoothScrollSupported;
|
@ -0,0 +1,17 @@
|
||||
const isSmoothScrollSupported = () =>
|
||||
'scrollBehavior' in document.documentElement.style;
|
||||
|
||||
const smoothScroll = id => e => {
|
||||
if (!isSmoothScrollSupported()) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
document.querySelector('#' + id).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start',
|
||||
inline: 'nearest',
|
||||
});
|
||||
};
|
||||
|
||||
export default smoothScroll;
|