import './App.css'; import { useState } from 'react'; import axios from 'axios'; function App() { const [datasetQuarry, setDatasetQuarry] = useState(''); const [tableQuarry, setTableQuarry] = useState(''); const [columns, setColumns] = useState(''); const [datasetQuarry2, setDatasetQuarry2] = useState(''); const [tableQuarry2, setTableQuarry2] = useState(''); const [columns2, setColumns2] = useState(''); const [results, setResults] = useState(''); const [isVisible, setIsVisible] = useState(true); const fetchDataFromAPI = async (ldataset, ltable, lcolumn, tdataset, ttable, tcolumn) => { try { postML(entryId, ldataset, ltable, lcolumn, tdataset, ttable, tcolumn); } catch (error) { console.error('ERROR fetching data:', error); setResults('Error fetching data'); } }; const handleButtonClick = () => { fetchDataFromAPI(datasetQuarry2, tableQuarry2, columns2, datasetQuarry, tableQuarry, columns); }; const toggleVisibility = () => { setIsVisible(!isVisible); }; return (
{isVisible &&