Replace hideSwitch by showSwitch
This commit is contained in:
@@ -51,7 +51,7 @@ function StyledMenu(props) {
|
||||
|
||||
const StyledMenuItem = MenuItem
|
||||
|
||||
function AjouteTradiksyon({hideSwitch, disableSwitch, tradiksyonOtomatik, setTradiksyonOtomatik, canAutoTranslate, chwaLang, setChwaLang}) {
|
||||
function AjouteTradiksyon({showSwitch, disableSwitch, tradiksyonOtomatik, setTradiksyonOtomatik, chwaLang, setChwaLang}) {
|
||||
const [anchorElement, setAnchorElement] = useState(null)
|
||||
|
||||
const handleClick = event => {
|
||||
@@ -66,7 +66,7 @@ function AjouteTradiksyon({hideSwitch, disableSwitch, tradiksyonOtomatik, setTra
|
||||
|
||||
return (
|
||||
<>
|
||||
{canAutoTranslate && !hideSwitch && (
|
||||
{showSwitch && (
|
||||
<OtomatikSwitch tradiksyonOtomatik={tradiksyonOtomatik} setTradiksyonOtomatik={setTradiksyonOtomatik} disabled={!chwaLang.includes('fr') || disableSwitch} />
|
||||
)}
|
||||
<Root style={{textAlign: 'center', marginTop: 20}}>
|
||||
@@ -130,11 +130,10 @@ function AjouteTradiksyon({hideSwitch, disableSwitch, tradiksyonOtomatik, setTra
|
||||
}
|
||||
|
||||
AjouteTradiksyon.propTypes = {
|
||||
hideSwitch: PropTypes.bool.isRequired,
|
||||
showSwitch: PropTypes.bool.isRequired,
|
||||
disableSwitch: PropTypes.bool.isRequired,
|
||||
tradiksyonOtomatik: PropTypes.bool.isRequired,
|
||||
setTradiksyonOtomatik: PropTypes.func.isRequired,
|
||||
canAutoTranslate: PropTypes.bool.isRequired,
|
||||
chwaLang: PropTypes.array.isRequired,
|
||||
setChwaLang: PropTypes.func.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user