You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _chapters/call-the-list-api.md
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Call the List API
4
4
date: 2017-01-27 00:00:00
5
5
description: To display a list of all of the user’s notes in our React.js app, we are going to make a GET request to our serverless API backend using the AWS Amplify API module. We are also going to use the ListGroup and ListGroupItem React-Bootstrap components to render the list.
1. It always renders a **Create a new note** button as the first item in the list (even if the list is empty). We do this by concatenating an array with an empty object with our `notes` array.
92
98
93
99
2. We render the first line of each note as the `ListGroupItem` header by doing `note.content.trim().split('\n')[0]`.
94
100
95
-
3. And `onClick` for each of the list items we navigate to their respective pages.
101
+
3. And the `LinkContainer` component directs our app to each of the items.
96
102
97
103
<imgclass="code-marker"src="/assets/s.png" />Let's also add a couple of styles to our `src/containers/Home.css`.
Copy file name to clipboardExpand all lines: _chapters/configure-aws-amplify.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Configure AWS Amplify
4
4
date: 2017-01-12 12:00:00
5
5
description: We are going to use the information of our AWS resources to configure AWS Amplify in our React app. We'll call the Amplify.configure() method when our app first loads.
Copy file name to clipboardExpand all lines: _chapters/connect-to-api-gateway-with-iam-auth.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Connect to API Gateway with IAM Auth
4
4
description: For our React.js app to make requests to a serverless backend API secured using AWS IAM, we need to sign our requests using Signature Version 4. But to be able to do that we need to use our User Pool user token and get temporary IAM credentials from our Identity Pool. Using these temporary IAM credentials we can then generate the Signature Version 4 security headers and make a request using HTTP fetch.
Copy file name to clipboardExpand all lines: _chapters/create-a-build-script.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
layout: post
3
3
title: Create a Build Script
4
4
date: 2018-03-26 00:00:00
5
-
code: frontend
5
+
code: frontend_full
6
6
description: To configure our Create React App with Netlify, we need to add a build script to our project root. To make sure that we return a HTTP status code of 200 for our React Router routes we will be adding a redirects rule.
Copy file name to clipboardExpand all lines: _chapters/delete-a-note.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Delete a Note
4
4
date: 2017-01-31 00:00:00
5
5
description: We want users to be able to delete their note in our React.js app. To do this we are going to make a DELETE request to our serverless API backend using AWS Amplify.
Copy file name to clipboardExpand all lines: _chapters/give-feedback-while-logging-in.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Give Feedback While Logging In
4
4
date: 2017-01-18 00:00:00
5
5
description: We should give users some feedback while we are logging them in to our React.js app. To do so we are going to create a component that animates a Glyphicon refresh icon inside a React-Bootstrap Button component. We’ll do the animation while the log in call is in progress.
Copy file name to clipboardExpand all lines: _chapters/handle-routes-with-react-router.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,23 +26,27 @@ This installs the NPM package and adds the dependency to your `package.json`.
26
26
27
27
Even though we don't have any routes set up in our app, we can get the basic structure up and running. Our app currently runs from the `App` component in `src/App.js`. We are going to be using this component as the container for our entire app. To do that we'll encapsulate our `App` component within a `Router`.
28
28
29
-
<imgclass="code-marker"src="/assets/s.png" />Replace code in `src/index.js` with the following.
29
+
<imgclass="code-marker"src="/assets/s.png" />Replace the following code in `src/index.js`:
Copy file name to clipboardExpand all lines: _chapters/redirect-on-login.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ title: Redirect on Login
4
4
date: 2017-02-04 00:00:00
5
5
description: To make sure that our React.js redirects a user to the right page after they login, we are going to use the React Router v4 Redirect component.
6
6
context: true
7
-
code: frontend
8
7
comments_id: redirect-on-login/24
9
8
---
10
9
@@ -14,7 +13,7 @@ Let's start by adding a method to read the `redirect` URL from the querystring.
14
13
15
14
<imgclass="code-marker"src="/assets/s.png" />Add the following method to your `src/components/UnauthenticatedRoute.js` below the imports.
Copy file name to clipboardExpand all lines: _chapters/setup-custom-fonts.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,18 @@ Here we are referencing all the 5 different weights (300, 400, 600, 700, and 800
29
29
30
30
Now we are ready to add our newly added fonts to our stylesheets. Create React App helps separate the styles for our individual components and has a master stylesheet for the project located in `src/index.css`.
31
31
32
-
<imgclass="code-marker"src="/assets/s.png" />Let's change the current font in `src/index.css` for the `body` tag from `font-family: sans-serif;`to the following.
32
+
<imgclass="code-marker"src="/assets/s.png" />Let's change the current font in `src/index.css` for the `body` tag to the following.
33
33
34
34
```css
35
-
font-family: "Open Sans", sans-serif;
36
-
font-size: 16px;
37
-
color: #333;
35
+
body {
36
+
margin: 0;
37
+
padding: 0;
38
+
font-family: "Open Sans", sans-serif;
39
+
font-size: 16px;
40
+
color: #333;
41
+
-webkit-font-smoothing: antialiased;
42
+
-moz-osx-font-smoothing: grayscale;
43
+
}
38
44
```
39
45
40
46
<imgclass="code-marker"src="/assets/s.png" />And let's change the fonts for the header tags to our new Serif font by adding this block to the css file.
0 commit comments