Skip to content

Commit

Permalink
Set default baseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
elarsaks committed Aug 6, 2023
1 parent 19b3cd1 commit 0a4f399
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import UseRef from "./pages/UseRef";
import UseState from "./pages/UseState";

export default function App() {
// Determine the correct base URL based on the environment (local or GitHub Pages)
const baseUrl = process.env.NODE_ENV === "production" ? "" : "/react-hooks";

return (
<BrowserRouter basename={baseUrl}>
<BrowserRouter basename={"/react-hooks"}>
<div className={app["App"]}>
<AppHeader />
<Routes>
Expand Down

0 comments on commit 0a4f399

Please sign in to comment.