Skip to content

Commit 15c47e7

Browse files
Fixed the Error Page
1 parent 810e845 commit 15c47e7

File tree

5 files changed

+41
-33
lines changed

5 files changed

+41
-33
lines changed

package-lock.json

+12-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"react-icons": "^5.2.1",
1616
"react-router-dom": "^6.24.0"
1717
},
18-
"devDependencies": {
18+
"devDependencies": {
1919
"@types/react": "^18.3.3",
2020
"@types/react-dom": "^18.2.22",
2121
"@vitejs/plugin-react": "^4.3.1",

postcss.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export default {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
};

src/main.jsx

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom/client';
3-
import './index.css';
1+
import React from "react";
2+
import ReactDOM from "react-dom/client";
3+
import "./index.css";
44

55
import {
66
Route,
77
RouterProvider,
88
createBrowserRouter,
99
createRoutesFromElements,
10-
} from 'react-router-dom';
11-
import Categories from './pages/Categories/Categories';
12-
import Login from './pages/Login/Login';
13-
import Toys from './pages/gifts/Toys';
14-
import AboutUs from './pages/About/AboutUs';
10+
} from "react-router-dom";
11+
import Categories from "./pages/Categories/Categories";
12+
import Login from "./pages/Login/Login";
13+
import Toys from "./pages/gifts/Toys";
14+
import AboutUs from "./pages/About/AboutUs";
1515
// import Gifts from './pages/gifts/Gifts';
1616
import Contact from "./pages/Contacts/Contact";
1717
import Dashboard from "./pages/Dashboard/Dashboard";
@@ -45,13 +45,12 @@ const router = createBrowserRouter(
4545

4646
{/* Drop down of categories */}
4747

48-
<Route path="/categories" element={<Categories />}/>
48+
<Route path="/categories" element={<Categories />} />
4949
<Route path="/categories/fashion" element={<Fashion />} />
5050
<Route path="/categories/bodycare" element={<BodyCare />} />
5151
<Route path="/categories/furniture" element={<Furniture />} />
5252
<Route path="/categories/stationary" element={<Stationary />} />
5353
<Route path="/categories/gifts" element={<Gifts />} />
54-
5554

5655
<Route path="about" element={<AboutUs />} />
5756
<Route path="help" element={<Help />} />
@@ -76,8 +75,8 @@ const router = createBrowserRouter(
7675
)
7776
);
7877

79-
ReactDOM.createRoot(document.getElementById('root')).render(
78+
ReactDOM.createRoot(document.getElementById("root")).render(
8079
<>
8180
<RouterProvider router={router} />
82-
</>,
81+
</>
8382
);

src/pages/404-Page/Error.jsx

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1-
import React from 'react';
2-
import {NavLink} from 'react-router-dom';
1+
import React from "react";
2+
import { NavLink } from "react-router-dom";
33

44
const Page404 = () => {
55
return (
66
<section className="flex flex-col items-center justify-center min-h-screen bg-white py-10">
77
<div className="flex flex-col items-center">
88
<div className="relative w-full max-w-xl">
9-
<div className="bg-cover bg-center h-80" style={{ backgroundImage: 'url(https://cdn.dribbble.com/users/285475/screenshots/2083086/dribbble_1.gif)' }}>
9+
<div
10+
className="bg-cover bg-center h-80"
11+
style={{
12+
backgroundImage:
13+
"url(https://cdn.dribbble.com/users/285475/screenshots/2083086/dribbble_1.gif)",
14+
}}>
1015
<h1 className="text-center text-6xl font-bold">404</h1>
1116
</div>
1217
</div>
1318
<div className="text-center mt-[-2.5rem]">
1419
<h3 className="text-4xl font-semibold">Look like you're lost</h3>
15-
<p className="text-lg mt-4">The page you are looking for is not available!</p>
16-
<NavLink to="/" className="inline-block mt-5 px-6 py-2 text-white bg-green-600 rounded">Go to Home</NavLink>
20+
<p className="text-lg mt-4">
21+
The page you are looking for is not available!
22+
</p>
23+
<NavLink
24+
to="/"
25+
className="inline-block mt-5 px-6 py-2 text-white bg-green-600 rounded">
26+
Go to Home
27+
</NavLink>
1728
</div>
1829
</div>
1930
</section>

0 commit comments

Comments
 (0)