import { createPortal } from 'react-dom';
import { TaskInfoContainer } from '../components/common/SwitchFormTask/SwitchFormTask.style';

import RealtimeTable from '../components/RealtimeTable';
import { RealtimeProvider } from '../components/RealtimeTable/contexts/RealtimeContext';

const TableInfo = () => {
  const portalContent = (
    <TaskInfoContainer>
      {/* <BackButton to={`/task/${table.task_id}`} />
      <NameTask>{table.name}</NameTask> */}
    </TaskInfoContainer>
  );

  const targetElement = document.getElementById('TableInfo');

  if (targetElement) {
    return createPortal(portalContent, targetElement);
  }
};

export default function NewTablePage() {
  return (
    <>

      <RealtimeTable
      />
    </>
  );
}
