'Unexpected use of comma operator React

Line 85:74: Unexpected use of comma operator no-sequences Line 85:153: Unexpected use of comma operator

    <div className={"card text-white bg-success me-auto ms-auto mt-5",res.percentage >= 50 ? "bg-success" : "bg-danger"} style={{maxWidth : "30rem"},{display : translate=== ""? "none":""}}>


Solution 1:[1]

<div className={"card text-white bg-success me-auto ms-auto mt-5 ",res.percentage >= 50 ? "bg-success" : "bg-danger"} style={{maxWidth : "30rem", display : translate=== ""? "none":""}}>

You have just done a syntax mistake. When using style prop in React you need to pass just one object with all the rules.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1