Skip to content

Commit 3d3e1f8

Browse files
committed
quic fix
1 parent e17e544 commit 3d3e1f8

2 files changed

Lines changed: 32 additions & 13 deletions

File tree

public/404.html

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
<script type="text/javascript">
2-
(function () {
3-
// Get the current path
4-
var path = window.location.pathname;
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/alabat.svg" />
6+
<link rel="preconnect" href="https://fonts.googleapis.com" />
7+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
8+
<link
9+
href="https://fonts.googleapis.com/css2?family=Bytesized&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
10+
rel="stylesheet"
11+
/>
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13+
<title>Jioh In</title>
14+
</head>
15+
<body>
16+
<div id="root"></div>
17+
<script type="module" src="/src/main.tsx"></script>
18+
</body>
19+
<script type="text/javascript">
20+
(function () {
21+
// Get the current path
22+
var path = window.location.pathname;
523

6-
// If the path is not root, redirect to the same path but with an anchor
7-
if (path !== "/" && !path.includes("index.html")) {
8-
window.location.replace(window.location.origin + "/#" + path);
9-
}
10-
})();
11-
</script>
24+
// If the path is not root, redirect to the same path but with an anchor
25+
if (path !== "/" && !path.includes("index.html")) {
26+
window.location.replace(window.location.origin + "/#" + path);
27+
}
28+
})();
29+
</script>
30+
</html>

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import "./App.css";
66

7-
import { BrowserRouter, Route, Routes } from "react-router-dom";
7+
import { HashRouter as Router, Route, Routes } from "react-router-dom";
88
import { ThemeProvider } from "@/components/ThemeProvider";
99

1010
// Pages
@@ -15,13 +15,13 @@ import CookPage from "@/domains/cook/CookPage";
1515
export default function App() {
1616
return (
1717
<ThemeProvider defaultTheme="light" storageKey="vite-ui-theme">
18-
<BrowserRouter>
18+
<Router>
1919
<Routes>
2020
<Route path="/" element={<PortfolioPage />} />
2121
<Route path="/blog" element={<BlogPage />} />
2222
<Route path="/cook" element={<CookPage />} />
2323
</Routes>
24-
</BrowserRouter>
24+
</Router>
2525
</ThemeProvider>
2626
);
2727
}

0 commit comments

Comments
 (0)