import isMobile from 'is-mobile'
import { useEffect, useState } from 'react'

const DesktopView = ({ children }) => {
  const [view, setView] = useState(<></>)

  useEffect(() => {
    if (!isMobile()) setView(children)
  }, [children])

  return view
}

export default DesktopView
