Replace hideSwitch by showSwitch
This commit is contained in:
@@ -73,7 +73,7 @@ const Alert = forwardRef(function Alert(props, ref) {
|
||||
|
||||
const RemoveTooltip = Tooltip
|
||||
|
||||
function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
function EkriTeks({canAutoTranslate, selectedTeks, setSelectedTeks}) {
|
||||
const {data: session} = useSession()
|
||||
const {jwt, user} = session
|
||||
const [teksEkri, setTeksEkri] = useState({awtis: '', tit: '', transkripsyon: ''})
|
||||
@@ -367,11 +367,10 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
))}
|
||||
</form>
|
||||
<AjouteTradiksyon
|
||||
hideSwitch={Boolean(currentTeksId)}
|
||||
showSwitch={Boolean(canAutoTranslate) && Boolean(!currentTeksId)}
|
||||
disableSwitch={tradiksyon.fr === ''}
|
||||
tradiksyonOtomatik={tradiksyonOtomatik}
|
||||
setTradiksyonOtomatik={setTradiksyonOtomatik}
|
||||
canAutoTranslate={user.canAutoTranslate}
|
||||
chwaLang={kiChawLang}
|
||||
setChwaLang={setKiChwalang}
|
||||
/>
|
||||
@@ -425,6 +424,7 @@ EkriTeks.defaultProps = {
|
||||
}
|
||||
|
||||
EkriTeks.propTypes = {
|
||||
canAutoTranslate: PropTypes.bool.isRequired,
|
||||
selectedTeks: PropTypes.object,
|
||||
setSelectedTeks: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user