Skip to content

Commit 1521c56

Browse files
committed
fix 404.html attempt 6
1 parent 968b2c9 commit 1521c56

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

public/404.html

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,9 @@
44
<meta charset="utf-8">
55
<title>Redirecting...</title>
66
<script type="text/javascript">
7-
// Single Page Apps for GitHub Pages
8-
// MIT License
9-
// https://github.com/rafgraph/spa-github-pages
10-
// This script takes the current URL and converts the path and query
11-
// string into just a query string, and then redirects the browser
12-
// to the new URL with the query string and hash fragment, but no
13-
// path, to load the single page app's index.html root.
14-
(function(){
15-
var path = window.location.pathname;
16-
var query = window.location.search;
17-
var fragment = window.location.hash;
18-
19-
// Only redirect if not already on index.html and not a direct file request
20-
if (path !== '/index.html' && !path.endsWith('.html')) {
21-
window.history.replaceState(null, null, path + query + fragment);
22-
window.location.replace('/index.html');
23-
}
24-
})();
7+
// Redirect to the root of the application
8+
// The React app's BrowserRouter will then handle the path
9+
window.location.replace('/');
2510
</script>
2611
</head>
2712
<body>

src/components/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Footer = () => {
3333
<Link to="/logs" className="text-primary-400 hover:text-white transition-colors" onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}>Logs</Link>
3434
</div>
3535
<p className="text-sm text-gray-500">
36-
&copy; {new Date().getFullYear()} fezcode. All rights reserved. <code> v0.0.2 </code>
36+
&copy; {new Date().getFullYear()} fezcode. All rights reserved. <code> v0.0.3 </code>
3737
</p>
3838
</div>
3939
</div>

0 commit comments

Comments
 (0)