Skip to content

Commit de79b78

Browse files
committed
all folder and other file created
1 parent 5972e41 commit de79b78

File tree

12 files changed

+172
-3
lines changed

12 files changed

+172
-3
lines changed

package-lock.json

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

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"@testing-library/user-event": "^13.5.0",
99
"react": "^18.2.0",
1010
"react-dom": "^18.2.0",
11+
"react-hot-toast": "^2.4.0",
12+
"react-router-dom": "^6.4.2",
1113
"react-scripts": "5.0.1",
1214
"web-vitals": "^2.1.4"
1315
},

public/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="https://play-lh.googleusercontent.com/XDiye8wlBGFoAkxAyoxB5mPidDLtvViBBA9-DXWPmD6NxltrhFFTdJK2Eiv_h7EvaFc" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
@@ -24,7 +24,7 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<title>Fire Education</title>
2828
</head>
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>

src/App.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { RouterProvider } from 'react-router-dom';
12
import './App.css';
3+
import { routes } from './Routes/Routes';
24

35
function App() {
46
return (
57
<div>
6-
8+
<RouterProvider router={routes}></RouterProvider>
79
</div>
810
);
911
}

src/Components/Pages/Home/Home.css

Whitespace-only changes.

src/Components/Pages/Home/Home.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import './Home.css'
3+
4+
const Home = () => {
5+
return (
6+
<div>
7+
<h2>This is Home</h2>
8+
</div>
9+
);
10+
};
11+
12+
export default Home;

src/Components/Shared/Header/Header.css

Whitespace-only changes.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import './Header.css'
3+
4+
const Header = () => {
5+
return (
6+
<div>
7+
<h1>This is a header</h1>
8+
</div>
9+
);
10+
};
11+
12+
export default Header;

src/Components/Shared/SideNav/SideNav.js

Whitespace-only changes.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const AuthProvider = () => {
4+
return (
5+
<div>
6+
7+
</div>
8+
);
9+
};
10+
11+
export default AuthProvider;

src/Layouts/Main.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import { Outlet } from 'react-router-dom';
3+
import Header from '../Components/Shared/Header/Header';
4+
5+
const Main = () => {
6+
return (
7+
<>
8+
<Header></Header>
9+
<Outlet></Outlet>
10+
</>
11+
);
12+
};
13+
14+
export default Main;

src/Routes/Routes.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { createBrowserRouter } from "react-router-dom";
2+
import Home from "../Components/Pages/Home/Home";
3+
import Main from "../Layouts/Main";
4+
5+
export const routes = createBrowserRouter([
6+
7+
{
8+
path: '/',
9+
element: <Main></Main>,
10+
children: [
11+
{
12+
path: '/',
13+
element: <Home></Home>
14+
}
15+
]
16+
}
17+
])

0 commit comments

Comments
 (0)