Skip to content

Commit

Permalink
feat: add router basename
Browse files Browse the repository at this point in the history
  • Loading branch information
emily40830 committed Dec 21, 2022
1 parent 5a00786 commit 0b68a5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { HomePage, LoginPage, SignUpPage, TodoPage } from 'pages';
import { AuthProvider } from 'contexts/AuthContext';

const basename = process.env.PUBLIC_URL;

function App() {
return (
<div className="app">
<BrowserRouter>
<BrowserRouter basename={basename}>
<AuthProvider>
<Routes>
<Route path="todos" element={<TodoPage />} />
Expand Down

0 comments on commit 0b68a5a

Please sign in to comment.