File tree 3 files changed +3
-3
lines changed
examples/with-static-export
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const fetch = require('isomorphic-fetch')
3
3
module . exports = {
4
4
async exportPathMap ( ) {
5
5
// we fetch our list of posts, this allow us to dynamically generate the exported pages
6
- const response = await fetch ( 'http ://jsonplaceholder.typicode.com/posts?_page=1' )
6
+ const response = await fetch ( 'https ://jsonplaceholder.typicode.com/posts?_page=1' )
7
7
const postList = await response . json ( )
8
8
9
9
// tranform the list of posts into a map of pages with the pathname `/post/:id`
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import Post from '../components/post'
7
7
export default class extends Component {
8
8
static async getInitialProps ( ) {
9
9
// fetch list of posts
10
- const response = await fetch ( 'http ://jsonplaceholder.typicode.com/posts?_page=1' )
10
+ const response = await fetch ( 'https ://jsonplaceholder.typicode.com/posts?_page=1' )
11
11
const postList = await response . json ( )
12
12
return { postList }
13
13
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import fetch from 'isomorphic-fetch'
6
6
export default class extends Component {
7
7
static async getInitialProps ( { query } ) {
8
8
// fetch single post detail
9
- const response = await fetch ( `http ://jsonplaceholder.typicode.com/posts/${ query . id } ` )
9
+ const response = await fetch ( `https ://jsonplaceholder.typicode.com/posts/${ query . id } ` )
10
10
const post = await response . json ( )
11
11
return { ...post }
12
12
}
You can’t perform that action at this time.
0 commit comments