From 95fb83bf6f06652ece124879ba364fd0a33e27d3 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 25 Sep 2022 23:23:18 -0300 Subject: [PATCH] Reverted react-number-format to a stable version. Modified gitlab-ci.yml to correctly move the content from build to public folder. --- .gitlab-ci.yml | 2 +- package.json | 2 +- src/pages/timer/components/CountdownInput.tsx | 19 +++++++++---------- yarn.lock | 14 +++++++------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1517c22..39ce103 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ pages: - build script: - rm -rf public - - cp -r * build + - ls -l - mv build public artifacts: paths: diff --git a/package.json b/package.json index d6422bf..f0ffa5a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@types/react-redux": "^7.1.18", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-number-format": "^5.0.0", + "react-number-format": "^4.6.4", "react-redux": "^7.2.4", "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", diff --git a/src/pages/timer/components/CountdownInput.tsx b/src/pages/timer/components/CountdownInput.tsx index 84cadc7..4a87918 100644 --- a/src/pages/timer/components/CountdownInput.tsx +++ b/src/pages/timer/components/CountdownInput.tsx @@ -1,8 +1,8 @@ import makeStyles from "@material-ui/core/styles/makeStyles"; import TextField from "@material-ui/core/TextField"; import React from "react"; -import { PatternFormat } from "react-number-format"; -import { getSecondsFromMMSS, toMMSS } from "../timerHelper"; +import NumberFormat from "react-number-format"; +import { getSecondsFromMMSS, timerLimit, toMMSS } from "../timerHelper"; interface CountdownInputProps { onChange: (event: React.ChangeEvent) => void @@ -24,6 +24,7 @@ const useStyles = makeStyles({ const CountdownInput = (props: CountdownInputProps) => { const classes = useStyles(); const {onChange, value} = props; + console.log(value) const onBlur = (event: React.FocusEvent) => { const newValue = event.target.value; @@ -34,18 +35,16 @@ const CountdownInput = (props: CountdownInputProps) => { }; return ( - ) } diff --git a/yarn.lock b/yarn.lock index 4a8ac83..617733d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3263,9 +3263,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001181: - version "1.0.30001191" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001191.tgz#bacb432b6701f690c8c5f7c680166b9a9f0843d9" - integrity sha512-xJJqzyd+7GCJXkcoBiQ1GuxEiOBCLQ0aVW9HMekifZsAVGdj5eJ4mFB9fEhSHipq9IOk/QXFJUiIr9lZT+EsGw== + version "1.0.30001412" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz" + integrity sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA== capture-exit@^2.0.0: version "2.0.0" @@ -9383,10 +9383,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== -react-number-format@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/react-number-format/-/react-number-format-5.0.0.tgz#db82a847def927a543bd661d9522855d3e09927a" - integrity sha512-wrGJd3Ygv/UHCMyoixjRySM/RQ7SY6WOppL5nL/nnd49Wz2xUMeVIHEkclnerBE2eicmEBevO3iaIkJp2izQBQ== +react-number-format@^4.6.4: + version "4.9.4" + resolved "https://registry.yarnpkg.com/react-number-format/-/react-number-format-4.9.4.tgz#013ae526000e676e491763ce14da66fb330a9bd8" + integrity sha512-Gq20Z3ugqPLFgeaidnx5on9cNpbQZntPN3QgNAL/WJrNNlQnNznY0LCx7g8xtssmRBw0/hw+SCqw6zAcajooiA== dependencies: prop-types "^15.7.2"