import React, { useEffect } from "react";
import ResponsiveIFrame from "../Controls/ResponsiveIFrame";
import { SupersetDashboardURL } from "../../services/superset";
import { useStatusContext } from "../Contexts/StatusContext";
import useStyles from "../useStyles";

const Dashboard = () => {
  const classes = useStyles();
  const { setTitle } = useStatusContext();

  useEffect(() => {
    setTitle("Datascope");
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);

  return (
    <ResponsiveIFrame
      src={SupersetDashboardURL}
      title="Dashboard"
      classes={classes}
      fullscreen
    />
  );
};

export default Dashboard;
