Skip to content

Commit 4edffb8

Browse files
Updated
1 parent 3830d7f commit 4edffb8

File tree

1,714 files changed

+18392
-10723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,714 files changed

+18392
-10723
lines changed

Section 20/.gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.DS_Store
2+
.vscode
3+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
4+
5+
# dependencies
6+
/node_modules
7+
/.pnp
8+
.pnp.js
9+
10+
# testing
11+
/coverage
12+
13+
# production
14+
/build
15+
16+
# misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*

Section 20/code/01-starting-project/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@testing-library/jest-dom": "^5.11.6",
7-
"@testing-library/react": "^11.2.2",
8-
"@testing-library/user-event": "^12.5.0",
9-
"react": "^18.0.0",
10-
"react-dom": "^18.0.0",
11-
"react-scripts": "^5.0.1",
12-
"web-vitals": "^0.2.4"
6+
"@testing-library/jest-dom": "^5.16.5",
7+
"@testing-library/react": "^13.4.0",
8+
"@testing-library/user-event": "^13.5.0",
9+
"react": "^18.2.0",
10+
"react-dom": "^18.2.0",
11+
"react-scripts": "5.0.1",
12+
"web-vitals": "^2.1.4"
1313
},
1414
"scripts": {
1515
"start": "react-scripts start",
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
function App() {
2-
return (
3-
<div>
4-
<h2>Let's get started!</h2>
5-
</div>
6-
);
2+
return <div></div>;
73
}
84

95
export default App;
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,50 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');
2-
31
* {
42
box-sizing: border-box;
53
}
64

7-
html {
8-
font-family: 'Noto Sans JP', sans-serif;
5+
:root {
6+
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
7+
font-size: 16px;
8+
line-height: 24px;
9+
font-weight: 400;
10+
11+
color-scheme: light dark;
12+
color: rgba(255, 255, 255, 0.87);
13+
background-color: #242424;
14+
15+
font-synthesis: none;
16+
text-rendering: optimizeLegibility;
17+
-webkit-font-smoothing: antialiased;
18+
-moz-osx-font-smoothing: grayscale;
19+
-webkit-text-size-adjust: 100%;
20+
21+
--color-gray-100: #f4f3f1;
22+
--color-gray-200: #dddbd8;
23+
--color-gray-300: #ccc9c6;
24+
--color-gray-400: #aeaba7;
25+
--color-gray-500: #8a8784;
26+
--color-gray-600: #656360;
27+
--color-gray-700: #4b4a47;
28+
--color-gray-800: #31302e;
29+
--color-gray-900: #1f1d1b;
30+
31+
--color-primary-100: #fcf3e1;
32+
--color-primary-200: #fceccd;
33+
--color-primary-300: #fae1af;
34+
--color-primary-400: #fbd997;
35+
--color-primary-500: #ffd37c;
36+
--color-primary-600: #f9c762;
37+
--color-primary-700: #fbc14d;
38+
--color-primary-800: #fab833;
39+
--color-primary-900: #f6ad1b;
940
}
1041

1142
body {
1243
margin: 0;
13-
background-color: #3f3f3f;
1444
}
1545

46+
ul {
47+
list-style: none;
48+
margin: 0;
49+
padding: 0;
50+
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import React from 'react';
12
import ReactDOM from 'react-dom/client';
23

34
import './index.css';
45
import App from './App';
56

67
const root = ReactDOM.createRoot(document.getElementById('root'));
7-
root.render(<App />);
8+
root.render(
9+
<React.StrictMode>
10+
<App />
11+
</React.StrictMode>
12+
);

Section 20/code/02-defining-and-using-routes/src/App.js

-22
This file was deleted.

Section 20/code/02-defining-and-using-routes/src/index.css

-15
This file was deleted.

Section 20/code/02-defining-and-using-routes/src/pages/Products.js

-5
This file was deleted.

Section 20/code/02-defining-and-using-routes/src/pages/Welcome.js

-5
This file was deleted.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
2+
3+
import HomePage from './pages/Home';
4+
5+
const router = createBrowserRouter([
6+
{ path: '/', element: <HomePage /> },
7+
]);
8+
9+
function App() {
10+
return <RouterProvider router={router} />;
11+
}
12+
13+
export default App;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function HomePage() {
2+
return <h1>My Home Page</h1>;
3+
}
4+
5+
export default HomePage;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {
2+
createBrowserRouter,
3+
// createRoutesFromElements,
4+
RouterProvider,
5+
// Route,
6+
} from 'react-router-dom';
7+
8+
import HomePage from './pages/Home';
9+
import ProductsPage from './pages/Products';
10+
11+
// const routeDefinitions = createRoutesFromElements(
12+
// <Route>
13+
// <Route path="/" element={<HomePage />} />
14+
// <Route path="/products" element={<ProductsPage />} />
15+
// </Route>
16+
// );
17+
18+
const router = createBrowserRouter([
19+
{ path: '/', element: <HomePage /> },
20+
{ path: '/products', element: <ProductsPage /> },
21+
]);
22+
23+
// const router = createBrowserRouter(routeDefinitions);
24+
25+
function App() {
26+
return <RouterProvider router={router} />;
27+
}
28+
29+
export default App;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function HomePage() {
2+
return <h1>My Home Page</h1>;
3+
}
4+
5+
export default HomePage;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function ProductsPage() {
2+
return <h1>The Products Page</h1>;
3+
}
4+
5+
export default ProductsPage;

Section 20/code/03-working-with-links/src/App.js

-26
This file was deleted.

Section 20/code/03-working-with-links/src/components/MainHeader.js

-22
This file was deleted.

Section 20/code/03-working-with-links/src/components/MainHeader.module.css

-37
This file was deleted.

Section 20/code/03-working-with-links/src/index.css

-26
This file was deleted.

Section 20/code/03-working-with-links/src/pages/Products.js

-5
This file was deleted.

Section 20/code/03-working-with-links/src/pages/Welcome.js

-5
This file was deleted.

0 commit comments

Comments
 (0)