Skip to content

Commit 061b969

Browse files
committed
404 issue soln1
1 parent 204ac30 commit 061b969

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

public/404.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/App.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ function App() {
3232
return () => unsubscribe(); // Clean up on unmount
3333
}, []);
3434
// Handle redirects from GitHub Pages 404 fallback
35-
function RedirectWithState() {
36-
const location = useLocation();
37-
useEffect(() => {
38-
const redirectPath = new URLSearchParams(location.search).get('redirect');
39-
if (redirectPath) {
40-
window.history.replaceState({}, '', redirectPath);
41-
}
42-
}, [location]);
43-
return null;
44-
}
35+
// function RedirectWithState() {
36+
// const location = useLocation();
37+
// useEffect(() => {
38+
// const redirectPath = new URLSearchParams(location.search).get('redirect');
39+
// if (redirectPath) {
40+
// window.history.replaceState({}, '', redirectPath);
41+
// }
42+
// }, [location]);
43+
// return null;
44+
// }
4545

4646
return (
4747
<Router basename={import.meta.env.BASE_URL}>
48-
<RedirectWithState />
48+
{/* <RedirectWithState /> */}
4949
<div className="App">
5050
{/* Pass user status as loggedin prop to Navbar */}
5151
<Navbar loggedin={user ? 'true' : 'false'} />

0 commit comments

Comments
 (0)