Skip to content

Commit

Permalink
[v2][tut. part 1] Bracket consistency (gatsbyjs#5432)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryandi Tjia authored and pieh committed May 15, 2018
1 parent 8855773 commit 3704700
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions docs/tutorial/part-one/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,29 @@ Change the color to "pink". Then to "tomato".

2. Add some paragraph text.

```jsx{5-6}
```jsx{3,5-6,8}
import React from "react"
export default () =>
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
</div>
export default () => (
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
</div>
)
```

3. Add an image (in this case, a random one from Unsplash)

```jsx{7}
import React from "react"
export default () =>
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
<img src="https://source.unsplash.com/random/400x200" alt="" />
</div>
export default () => (
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
<img src="https://source.unsplash.com/random/400x200" alt="" />
</div>
)
```

Now your screen should look something like this:
Expand All @@ -159,7 +161,7 @@ like:
import React from "react"
import { Link } from "gatsby"
export default () =>
export default () => (
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
Expand All @@ -169,6 +171,7 @@ export default () =>
<Link to="/page-2/">Link</Link>
</div>
</div>
)
```

If you click on that link in the browser you should see:
Expand Down Expand Up @@ -216,7 +219,7 @@ You'll start by creating a new link to a page at `/counter`/ from your original
import React from "react"
import { Link } from "gatsby"
export default () =>
export default () => (
<div style={{ color: `tomato` }}>
<h1>Hello Gatsby!</h1>
<p>What a world.</p>
Expand All @@ -229,6 +232,7 @@ export default () =>
<Link to="/counter/">Counter</Link>
</div>
</div>
)
```

Add that link, click on it, and then you'll create a "Hello World" page component
Expand Down

0 comments on commit 3704700

Please sign in to comment.