From 37953a9fbb6fdd97a2db8dd7b67f48f0eba37eba Mon Sep 17 00:00:00 2001 From: wjallen Date: Wed, 30 Oct 2024 13:24:13 -0500 Subject: [PATCH] using axios base url in header.js --- frontend/src/components/Header/Header.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Header/Header.js b/frontend/src/components/Header/Header.js index 4e20ccc..8c593dd 100644 --- a/frontend/src/components/Header/Header.js +++ b/frontend/src/components/Header/Header.js @@ -12,6 +12,7 @@ import Container from 'react-bootstrap/Container'; import Nav from 'react-bootstrap/Nav'; import Navbar from 'react-bootstrap/Navbar'; +axios.defaults.baseURL = "http://localhost:8000"; const Header = ({ currentIndex, setCurrentIndex }) => { const [activeTab, setActiveTab] = useState('home'); @@ -34,7 +35,7 @@ const Header = ({ currentIndex, setCurrentIndex }) => { const handlePageLeave = async () => { localStorage.clear(); - await axios.get('http://localhost:8000/api/reset'); + await axios.get('api/reset'); } const renderTabContent = () => {