calc=()=>{
this.setState({ result:(eval(this.state.result.replace(".", "$1")
.replace(/\.{2,}/g, "").replace ("$1", ".").replace(/[-+*\/]+([+*\/])/, "$1"))||"")+""})}
Heya~!
It looks like, from what I can tell, that you are removing the extra decimals when the user presses the =
button.
Instead, you should be checking for the decimal in the display, and preventing the user from adding another decimal to the same number.
As an aside, screenshots and code snippets make things difficult to debug. It is easier to help if we have a link to the live project (in this case, your codepen )