remove react-scroll-to-component

This commit is contained in:
Paul Chavard 2021-02-10 19:01:18 +01:00
parent 1c164c4376
commit df80f5681d
3 changed files with 4 additions and 61 deletions

View file

@ -1,4 +1,3 @@
import scrollToComponent from 'react-scroll-to-component';
import { debounce } from '@utils';
import {
createTypeDeChampOperation,
@ -53,8 +52,10 @@ function addTypeDeChamp(state, typeDeChamps, insertAfter, done) {
state.flash.success();
done();
if (insertAfter) {
scrollToComponent(insertAfter.target.nextElementSibling, {
duration: 300
insertAfter.target.nextElementSibling.scrollIntoView({
behavior: 'smooth',
block: 'start',
inline: 'nearest'
});
}
})

View file

@ -31,7 +31,6 @@
"react-mapbox-gl": "^4.8.6",
"react-mapbox-gl-draw": "^2.0.4",
"react-query": "^2.23.1",
"react-scroll-to-component": "^1.0.2",
"react-sortable-hoc": "^1.11.0",
"react-use": "^15.3.4",
"react_ujs": "^2.6.1",

View file

@ -3659,48 +3659,11 @@ commondir@^1.0.1:
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
component-clone@0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/component-clone/-/component-clone-0.2.2.tgz#c7f5979822880fad8cfb0962ba29186d061ee04f"
integrity sha1-x/WXmCKID62M+wliuikYbQYe4E8=
dependencies:
component-type "*"
component-emitter@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.0.tgz#ccd113a86388d06482d03de3fc7df98526ba8efe"
integrity sha1-zNETqGOI0GSC0D3j/H35hSa6jv4=
component-emitter@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
component-raf@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/component-raf/-/component-raf-1.2.0.tgz#b2bc72d43f1b014fde7a4b3c447c764bc73ccbaa"
integrity sha1-srxy1D8bAU/eeks8RHx2S8c8y6o=
component-tween@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/component-tween/-/component-tween-1.2.0.tgz#cc39ce5dbab05b52825f41d1947638a0b01b2b8a"
integrity sha1-zDnOXbqwW1KCX0HRlHY4oLAbK4o=
dependencies:
component-clone "0.2.2"
component-emitter "1.2.0"
component-type "1.1.0"
ease-component "1.0.0"
component-type@*:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-type/-/component-type-1.2.1.tgz#8a47901700238e4fc32269771230226f24b415a9"
integrity sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=
component-type@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/component-type/-/component-type-1.1.0.tgz#95b666aad53e5c8d1f2be135c45b5d499197c0c5"
integrity sha1-lbZmqtU+XI0fK+E1xFtdSZGXwMU=
compress-commons@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-3.0.0.tgz#833944d84596e537224dd91cf92f5246823d4f1d"
@ -4809,11 +4772,6 @@ earcut@^2.2.2:
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.2.tgz#41b0bc35f63e0fe80da7cddff28511e7e2e80d11"
integrity sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==
ease-component@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ease-component/-/ease-component-1.0.0.tgz#b375726db0b5b04595b77440396fec7daa5d77c9"
integrity sha1-s3VybbC1sEWVt3RAOW/sfapdd8k=
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
@ -10667,13 +10625,6 @@ react-query@^2.23.1:
dependencies:
"@babel/runtime" "^7.5.5"
react-scroll-to-component@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/react-scroll-to-component/-/react-scroll-to-component-1.0.2.tgz#f260dc936c62a53e772786d7832fe0884e195354"
integrity sha1-8mDck2xipT53J4bXgy/giE4ZU1Q=
dependencies:
scroll-to "0.0.2"
react-sortable-hoc@^1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-1.11.0.tgz#fe4022362bbafc4b836f5104b9676608a40a278f"
@ -11273,14 +11224,6 @@ screenfull@^5.0.0:
resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-5.0.2.tgz#b9acdcf1ec676a948674df5cd0ff66b902b0bed7"
integrity sha512-cCF2b+L/mnEiORLN5xSAz6H3t18i2oHh9BA8+CQlAh5DRw2+NFAGQJOSYbcGw8B2k04g/lVvFcfZ83b3ysH5UQ==
scroll-to@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/scroll-to/-/scroll-to-0.0.2.tgz#936d398a9133660a2492145c2c0081dfcb0728f3"
integrity sha1-k205ipEzZgokkhRcLACB38sHKPM=
dependencies:
component-raf "1.2.0"
component-tween "1.2.0"
scss-tokenizer@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"