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 [results, setResults] = useState(''); const fetchDataFromAPI = async (dataset, table, column) => { try { const response = await axios.get(`YOUR_API_ENDPOINT?dataset=${dataset}&table=${table}&column=${column}`); const data = response.data; setResults(data); } catch (error) { console.error('Error fetching data:', error); setResults('Error fetching data'); } }; const handleButtonClick = () => { // Call the API request function with the provided parameters fetchDataFromAPI(datasetQuarry, tableQuarry, columns); }; return (
setDatasetQuarry(e.target.value)} /> setTableQuarry(e.target.value)} />
setColumns(e.target.value)} />
); } export default App;