Skip to content

Commit

Permalink
Reverted react-number-format to a stable version. Modified gitlab-ci.…
Browse files Browse the repository at this point in the history
…yml to correctly move the content from build to public folder.
  • Loading branch information
lhbelfanti committed Sep 26, 2022
1 parent ee27676 commit 95fb83b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pages:
- build
script:
- rm -rf public
- cp -r * build
- ls -l
- mv build public
artifacts:
paths:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 9 additions & 10 deletions src/pages/timer/components/CountdownInput.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLInputElement>) => void
Expand All @@ -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<HTMLInputElement>) => {
const newValue = event.target.value;
Expand All @@ -34,18 +35,16 @@ const CountdownInput = (props: CountdownInputProps) => {
};

return (
<PatternFormat
id="countdown-input"
className={classes.countdownInput}
value={value}
valueIsNumericString={true}
<NumberFormat
format={timerLimit}
placeholder="MM:SS"
mask={["M", "M", "S", "S"]}
customInput={TextField}
onChange={onChange}
onBlur={onBlur}
allowEmptyFormatting={true}
format={"##:##"}
mask={"MMSS"}
value={value}
id="countdown-input"
className={classes.countdownInput}
/>
)
}
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 95fb83b

Please sign in to comment.