Skip to content

Commit c049dec

Browse files
Merge pull request #317 from Mr-Sunglasses/main
feat: Add new 404 page with some eastereggs 🐣
2 parents 1124156 + bd4292b commit c049dec

File tree

4 files changed

+34
-44
lines changed

4 files changed

+34
-44
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"flowbite-react": "^0.3.2",
1515
"prop-types": "^15.8.1",
1616
"react": "^18.3.1",
17+
"react-chrome-dino-ts": "^0.1.2",
1718
"react-dom": "^18.3.1",
1819
"react-dotenv": "^0.1.3",
1920
"react-facebook-login": "^4.1.1",

src/App.jsx

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import React from "react";
2+
import { BrowserRouter, Routes, Route } from "react-router-dom";
23
import Homepage from "./pages/Homepage";
3-
import Navbar from "./components/Navbar";
44
import Team from "./pages/Team";
55
import Contacts from "./pages/Contacts";
6-
import Shipyard from "./pages/Shipyard"
6+
import Shipyard from "./pages/Shipyard";
77
import About from "./pages/AboutOrg";
88
import Buiding from "./pages/Buiding";
9-
import ReactDOM from "react-dom/client";
109
import Guide from "./pages/Guide";
1110
import Faqs from "./pages/Faqs";
1211
import Resources from "./pages/Resources";
@@ -21,51 +20,37 @@ import Tail_wind from "./pages/Frontend/Tail_wind";
2120
import Vue__js from "./pages/Frontend/Vue__js";
2221
import React__native from "./pages/Frontend/React__native";
2322
import Three__js from "./pages/Frontend/Three__js";
24-
25-
// import About from './components/About'
26-
// import AboutOrg from "./pages/AboutOrg";
27-
import { BrowserRouter, Routes, Route } from "react-router-dom";
2823
import PageNotFound from "./pages/PageNotFound";
2924

30-
const root = ReactDOM.createRoot(document.getElementById("root"));
31-
root.render(<App />);
32-
3325
function App() {
3426
return (
3527
<BrowserRouter>
3628
<Routes>
37-
<Route path="/" element={<Homepage />}></Route>
38-
<Route path="/home" element={<Homepage />}></Route>
39-
<Route path="/team" element={<Team />}></Route>
40-
<Route path="/contact" element={<Contacts />}></Route>
41-
<Route path="/shipyard" element={<Shipyard />}></Route>
42-
<Route path="/about" element={<About />}></Route>
43-
<Route path="/building" element={<Buiding />}></Route>
44-
<Route path="/guide" element={<Guide />}></Route>
45-
<Route path="/faq" element={<Faqs />}></Route>
46-
<Route path="/resource" element={<Resources />}></Route>
47-
<Route path="/privacypolicy" element={<Privacy />}></Route>
48-
<Route path="/frontend" element={<Frontends />}></Route>
49-
<Route path="/html_css" element={<HTMLCSS />}></Route>
50-
<Route path="/javascript" element={<JS />}></Route>
51-
<Route path="/electron" element={<Eletron />}></Route>
52-
<Route path="/reactjs" element={<Reactjs />}></Route>
53-
<Route path="/nextjs" element={<Next__js />}></Route>
54-
<Route path="/tailwind" element={<Tail_wind />}></Route>
55-
<Route path="/vuejs" element={<Vue__js />}></Route>
56-
<Route path="/threejs" element={<Three__js />}></Route>
57-
<Route path="/reactnative" element={<React__native />}></Route>
58-
<Route path="*" element={<PageNotFound />}></Route>
29+
<Route path="/" element={<Homepage />} />
30+
<Route path="/home" element={<Homepage />} />
31+
<Route path="/team" element={<Team />} />
32+
<Route path="/contact" element={<Contacts />} />
33+
<Route path="/shipyard" element={<Shipyard />} />
34+
<Route path="/about" element={<About />} />
35+
<Route path="/building" element={<Buiding />} />
36+
<Route path="/guide" element={<Guide />} />
37+
<Route path="/faq" element={<Faqs />} />
38+
<Route path="/resource" element={<Resources />} />
39+
<Route path="/privacypolicy" element={<Privacy />} />
40+
<Route path="/frontend" element={<Frontends />} />
41+
<Route path="/html_css" element={<HTMLCSS />} />
42+
<Route path="/javascript" element={<JS />} />
43+
<Route path="/electron" element={<Eletron />} />
44+
<Route path="/reactjs" element={<Reactjs />} />
45+
<Route path="/nextjs" element={<Next__js />} />
46+
<Route path="/tailwind" element={<Tail_wind />} />
47+
<Route path="/vuejs" element={<Vue__js />} />
48+
<Route path="/threejs" element={<Three__js />} />
49+
<Route path="/reactnative" element={<React__native />} />
50+
<Route path="*" element={<PageNotFound />} />
5951
</Routes>
6052
</BrowserRouter>
6153
);
6254
}
6355

64-
export default App;
65-
66-
{
67-
/* <Navbar />
68-
<Hero />
69-
<About />
70-
<Newsletter/> */
71-
}
56+
export default App;

src/pages/PageNotFound.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Link } from "react-router-dom";
22
import logo_404 from "../assets/img/page_not_found_img/error.png";
3+
import DinoGame from 'react-chrome-dino-ts'
4+
import 'react-chrome-dino-ts/index.css'
35

46
function PageNotFound() {
57
return (
68
<div className="flex text-white flex-col items-center justify-center p-10">
7-
<img className="w-96 mx-auto " src={logo_404} alt="404-page-not-found" />
9+
<DinoGame />
810
<p className="font-bold md:text-3xl sm:text-2xl text-xl p-4 text-white">
911
Sorry the page you are looking for does not exist.
1012
</p>
1113
<button className="hover:bg-green-800 bg-[#0dff1c] w-[190px] h-[60px] rounded-md font-medium my-4 py-3 text-black">
12-
<button>
1314
<Link to="/">GO BACK HOME</Link>
14-
</button>
1515
</button>
1616
</div>
1717
);
1818
}
19-
2019
export default PageNotFound;

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,6 +2651,11 @@ queue-microtask@^1.2.2:
26512651
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
26522652
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
26532653

2654+
react-chrome-dino-ts@^0.1.2:
2655+
version "0.1.2"
2656+
resolved "https://registry.yarnpkg.com/react-chrome-dino-ts/-/react-chrome-dino-ts-0.1.2.tgz#4a247be70991ebb32568bd915edee6463b3c02c2"
2657+
integrity sha512-UT7zEkeLFykgwgl2r/5FHzZgs0Bp8c/ZpB+4TZxMPdgakrXGbR7CZl/wYZ5uTJKDwqf7JcEE/5sVZsKaWXuSBA==
2658+
26542659
react-dom@^18.3.1:
26552660
version "18.3.1"
26562661
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz"

0 commit comments

Comments
 (0)