I have this if/else statement
import { isMobile } from 'react-device-detect'
const MoneyManagementOffers = ({ text, title }) => {
const renderContent = () => {
const checkDevice = isMobile ? <h1>Gela</h1> : <h1>Margo</h1>
return checkDevice
}
Somehow it will always return <h1>Gela</h1> and I don't know why, Any suggestions, please?
Gelawill be returned. You shouldn't ask that question here, you should go to Github and create an issue with the library. There's nothing wrong with your code, it's a matter of what happens under the hood in react-device-detect library.