import 'aframe';
import { useState, useEffect } from 'react';
import { createPortal } from 'react-dom';
document.head.insertAdjacentHTML('beforeend', "<style>\n    canvas.a-canvas.a-mouse-cursor-hover:hover {\n      cursor: grab;\n    }\n  </style>");

var VRArenaSPA = function VRArenaSPA(props) {
  var _useState = useState(),
      container = _useState[0],
      setContainer = _useState[1];

  var children = props.children;
  useEffect(function () {
    var area = document.body;
    setContainer(area);
  }, []);
  return container ? /*#__PURE__*/createPortal(children, container) : null;
};

export default VRArenaSPA;