Skip to content

Commit

Permalink
update data url
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelaziz-mahdy committed May 14, 2024
1 parent 457a72d commit 4c1bc8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ function App() {
const [selectedFields, setSelectedFields] = useState([]);

useEffect(() => {
axios.get('/data.json')
const baseURL = window.location.pathname.includes('backend-benchmark') ? '/backend-benchmark' : '';
axios.get(`${baseURL}/data.json`)
.then(response => {
setData(response.data);
})
.catch(error => console.error('Error fetching data:', error));
}, []);

const handleServiceChange = (event) => {
const value = event.target.value;
setSelectedServices(prevServices => (
Expand Down

0 comments on commit 4c1bc8f

Please sign in to comment.