diff --git a/src/components/VoteFormWrapper/index.jsx b/src/components/VoteFormWrapper/index.jsx index 0921c31..f9dffc5 100644 --- a/src/components/VoteFormWrapper/index.jsx +++ b/src/components/VoteFormWrapper/index.jsx @@ -4,12 +4,15 @@ import DBuzzProposalBanner from '../../assets/dbuzz-proposal.png' import DoneIcon from '../../assets/done-icon.svg' import VoteWithHiveSignerButton from '../VoteWithHiveSignerButton' import party from "party-js" - +const isMobileDevice = () => { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent); +} const VoteFormWrapper = () => { const [username, setUsername] = useState('') const [errorMessage, setErrorMessage] = useState('') const [isProposalVoted, setIsProposalVoted] = useState(false) + const [isMobile, setIsMobile] = useState(isMobileDevice()); useEffect(() => { if(errorMessage) { @@ -41,7 +44,9 @@ const VoteFormWrapper = () => {
Vote for the proposal setUsername(e.target.value.replace('@', ''))} /> - + { + !isMobile && + } { errorMessage