Skip to content

Commit

Permalink
hotfix: Switch to hashrouter since github page does not actually work…
Browse files Browse the repository at this point in the history
… with brower router if you refresh page (F5), it will show as NOT FOUND page
  • Loading branch information
hhpr98 committed Oct 29, 2023
1 parent 4abdd39 commit 0783248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';

import { Routes, Route, Navigate } from "react-router";
import { BrowserRouter as Router } from "react-router-dom";
// https://stackoverflow.com/questions/71984401/react-router-not-working-with-github-pages
// Switch to the HashRouter since GitHub pages doesn't support the tech used by the BrowserRouter.
import { HashRouter as Router } from "react-router-dom";

import MainPage from './components/MainPage/MainPage';
import PlaceDetails from './components/PlaceDetails/PlaceDetails';
Expand Down

0 comments on commit 0783248

Please sign in to comment.