Skip to content

Commit

Permalink
using axios base url in header.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wjallen committed Oct 30, 2024
1 parent 7e101ef commit 37953a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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 = () => {
Expand Down

0 comments on commit 37953a9

Please sign in to comment.