Can now send sms right away

This commit is contained in:
Maxime Lalo 2023-12-01 16:38:15 +01:00
parent 0c924adfa7
commit bed8dc90a9
3 changed files with 64 additions and 64 deletions

122
package-lock.json generated
View File

@ -22,7 +22,7 @@
"eslint-config-next": "13.2.4",
"form-data": "^4.0.0",
"jwt-decode": "^3.1.2",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.99",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.102",
"next": "13.2.4",
"prettier": "^2.8.7",
"react": "18.2.0",
@ -432,9 +432,9 @@
}
},
"node_modules/@floating-ui/core": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz",
"integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==",
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.1.tgz",
"integrity": "sha512-QgcKYwzcc8vvZ4n/5uklchy8KVdjJwcOeI+HnnTNclJjs2nYsy23DOCf+sSV1kBwD9yDAoVKCkv/gEPzgQU3Pw==",
"dependencies": {
"@floating-ui/utils": "^0.1.3"
}
@ -496,14 +496,14 @@
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw=="
},
"node_modules/@mui/base": {
"version": "5.0.0-beta.24",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.24.tgz",
"integrity": "sha512-bKt2pUADHGQtqWDZ8nvL2Lvg2GNJyd/ZUgZAJoYzRgmnxBL9j36MSlS3+exEdYkikcnvVafcBtD904RypFKb0w==",
"version": "5.0.0-beta.25",
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.25.tgz",
"integrity": "sha512-Iiv+IcappRRv6IBlknIVmLkXxfp51NEX1+l9f+dIbBuPU4PaRULegr1lCeHKsC45KU5ruxM5xMg4R/de03aJQg==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@babel/runtime": "^7.23.4",
"@floating-ui/react-dom": "^2.0.4",
"@mui/types": "^7.2.9",
"@mui/utils": "^5.14.18",
"@mui/types": "^7.2.10",
"@mui/utils": "^5.14.19",
"@popperjs/core": "^2.11.8",
"clsx": "^2.0.0",
"prop-types": "^15.8.1"
@ -513,7 +513,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
@ -527,26 +527,26 @@
}
},
"node_modules/@mui/core-downloads-tracker": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.18.tgz",
"integrity": "sha512-yFpF35fEVDV81nVktu0BE9qn2dD/chs7PsQhlyaV3EnTeZi9RZBuvoEfRym1/jmhJ2tcfeWXiRuHG942mQXJJQ==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.19.tgz",
"integrity": "sha512-y4JseIen5pmZs1n9hHy95HKKioKco8f6N2lford2AmjJigVJOv0KsU0qryiCpyuEUZmi/xCduVilHsK9DSkPcA==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
}
},
"node_modules/@mui/material": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.18.tgz",
"integrity": "sha512-y3UiR/JqrkF5xZR0sIKj6y7xwuEiweh9peiN3Zfjy1gXWXhz5wjlaLdoxFfKIEBUFfeQALxr/Y8avlHH+B9lpQ==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.19.tgz",
"integrity": "sha512-jSPLXst/YPgDGolhiu4rbethKjLVrI1IkoK8YrFUv8ygxDuhQdsE6+ZqjSSRXk3ytTMf6ghPnQ88OFRk4XjpNw==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@mui/base": "5.0.0-beta.24",
"@mui/core-downloads-tracker": "^5.14.18",
"@mui/system": "^5.14.18",
"@mui/types": "^7.2.9",
"@mui/utils": "^5.14.18",
"@types/react-transition-group": "^4.4.8",
"@babel/runtime": "^7.23.4",
"@mui/base": "5.0.0-beta.25",
"@mui/core-downloads-tracker": "^5.14.19",
"@mui/system": "^5.14.19",
"@mui/types": "^7.2.10",
"@mui/utils": "^5.14.19",
"@types/react-transition-group": "^4.4.9",
"clsx": "^2.0.0",
"csstype": "^3.1.2",
"prop-types": "^15.8.1",
@ -558,7 +558,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
@ -580,12 +580,12 @@
}
},
"node_modules/@mui/private-theming": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.18.tgz",
"integrity": "sha512-WSgjqRlzfHU+2Rou3HlR2Gqfr4rZRsvFgataYO3qQ0/m6gShJN+lhVEvwEiJ9QYyVzMDvNpXZAcqp8Y2Vl+PAw==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.19.tgz",
"integrity": "sha512-U9w39VpXLGVM8wZlUU/47YGTsBSk60ZQRRxQZtdqPfN1N7OVllQeN4cEKZKR8PjqqR3aYRcSciQ4dc6CttRoXQ==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@mui/utils": "^5.14.18",
"@babel/runtime": "^7.23.4",
"@mui/utils": "^5.14.19",
"prop-types": "^15.8.1"
},
"engines": {
@ -593,7 +593,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
@ -606,11 +606,11 @@
}
},
"node_modules/@mui/styled-engine": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.18.tgz",
"integrity": "sha512-pW8bpmF9uCB5FV2IPk6mfbQCjPI5vGI09NOLhtGXPeph/4xIfC3JdIX0TILU0WcTs3aFQqo6s2+1SFgIB9rCXA==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.19.tgz",
"integrity": "sha512-jtj/Pyn/bS8PM7NXdFNTHWZfE3p+vItO4/HoQbUeAv3u+cnWXcTBGHHY/xdIn446lYGFDczTh1YyX8G4Ts0Rtg==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@babel/runtime": "^7.23.4",
"@emotion/cache": "^11.11.0",
"csstype": "^3.1.2",
"prop-types": "^15.8.1"
@ -620,7 +620,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.4.1",
@ -637,15 +637,15 @@
}
},
"node_modules/@mui/system": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz",
"integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.19.tgz",
"integrity": "sha512-4e3Q+2nx+vgEsd0h5ftxlZGB7XtkkPos/zWqCqnxUs1l/T70s0lF2YNrWHHdSQ7LgtBu0eQ0qweZG2pR7KwkAw==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@mui/private-theming": "^5.14.18",
"@mui/styled-engine": "^5.14.18",
"@mui/types": "^7.2.9",
"@mui/utils": "^5.14.18",
"@babel/runtime": "^7.23.4",
"@mui/private-theming": "^5.14.19",
"@mui/styled-engine": "^5.14.19",
"@mui/types": "^7.2.10",
"@mui/utils": "^5.14.19",
"clsx": "^2.0.0",
"csstype": "^3.1.2",
"prop-types": "^15.8.1"
@ -655,7 +655,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
@ -676,9 +676,9 @@
}
},
"node_modules/@mui/types": {
"version": "7.2.9",
"resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.9.tgz",
"integrity": "sha512-k1lN/PolaRZfNsRdAqXtcR71sTnv3z/VCCGPxU8HfdftDkzi335MdJ6scZxvofMAd/K/9EbzCZTFBmlNpQVdCg==",
"version": "7.2.10",
"resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.10.tgz",
"integrity": "sha512-wX1vbDC+lzF7FlhT6A3ffRZgEoKWPF8VqRoTu4lZwouFX2t90KyCMsgepMw5DxLak1BSp/KP86CmtZttikb/gQ==",
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0"
},
@ -689,12 +689,12 @@
}
},
"node_modules/@mui/utils": {
"version": "5.14.18",
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.18.tgz",
"integrity": "sha512-HZDRsJtEZ7WMSnrHV9uwScGze4wM/Y+u6pDVo+grUjt5yXzn+wI8QX/JwTHh9YSw/WpnUL80mJJjgCnWj2VrzQ==",
"version": "5.14.19",
"resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.19.tgz",
"integrity": "sha512-qAHvTXzk7basbyqPvhgWqN6JbmI2wLB/mf97GkSlz5c76MiKYV6Ffjvw9BjKZQ1YRb8rDX9kgdjRezOcoB91oQ==",
"dependencies": {
"@babel/runtime": "^7.23.2",
"@types/prop-types": "^15.7.10",
"@babel/runtime": "^7.23.4",
"@types/prop-types": "^15.7.11",
"prop-types": "^15.8.1",
"react-is": "^18.2.0"
},
@ -703,7 +703,7 @@
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mui"
"url": "https://opencollective.com/mui-org"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
@ -3360,7 +3360,7 @@
}
},
"node_modules/le-coffre-resources": {
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#a118b5320f7b834e52582f172beaa55a9921c684",
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#1d7347879b5b3ca70f685e3b567d5eba2d67827c",
"license": "MIT",
"dependencies": {
"class-transformer": "^0.5.1",
@ -3646,12 +3646,12 @@
}
},
"node_modules/object.assign": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz",
"integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==",
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
"integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.4",
"call-bind": "^1.0.5",
"define-properties": "^1.2.1",
"has-symbols": "^1.0.3",
"object-keys": "^1.1.1"
},

View File

@ -24,7 +24,7 @@
"eslint-config-next": "13.2.4",
"form-data": "^4.0.0",
"jwt-decode": "^3.1.2",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.99",
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.102",
"next": "13.2.4",
"prettier": "^2.8.7",
"react": "18.2.0",

View File

@ -14,8 +14,8 @@ type IProps = {
export default function StepTotp(props: IProps) {
const { onSubmit, validationErrors, partialPhoneNumber, onSendAnotherCode } = props;
const [disableNewCodeButton, setDisableNewCodeButton] = React.useState(true);
const [secondsBeforeNewCode, setSecondsBeforeNewCode] = React.useState(30);
const [disableNewCodeButton, setDisableNewCodeButton] = React.useState(false);
const [secondsBeforeNewCode, setSecondsBeforeNewCode] = React.useState(0);
useEffect(() => {
const interval = setInterval(() => {