import React, { useEffect, memo } from 'react';
import { useDispatch } from 'react-redux';
import axios from 'axios';
import VideoPoseEstimator from "../components/VideoPoseEstimator";
import Main from "./Main";
import "./style.css";
import { fetchExercises, updateUser } from "../store/rom/main";

var App = function App(props) {
  var dispatch = useDispatch();
  useEffect(function () {
    axios.defaults.baseURL = props.baseURL;
    dispatch(updateUser(props.user));
    dispatch(fetchExercises());
  }, [dispatch]);
  return /*#__PURE__*/React.createElement("div", {
    className: "estimator-template"
  }, /*#__PURE__*/React.createElement("div", {
    className: "coach-container"
  }, /*#__PURE__*/React.createElement(VideoPoseEstimator, null), /*#__PURE__*/React.createElement(Main, null)));
};

export default memo(App);