mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fix class name in data-fetch example (#4358)
* Fixed class name in data-fetch example * Removed needless empty lines
This commit is contained in:
parent
b2047de51a
commit
af1082286e
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import 'isomorphic-unfetch'
|
import 'isomorphic-unfetch'
|
||||||
|
|
||||||
export default class MyPage extends React.Component {
|
export default class Index extends React.Component {
|
||||||
static async getInitialProps () {
|
static async getInitialProps () {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const res = await fetch('https://api.github.com/repos/zeit/next.js')
|
const res = await fetch('https://api.github.com/repos/zeit/next.js')
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import 'isomorphic-unfetch'
|
import 'isomorphic-unfetch'
|
||||||
|
|
||||||
export default class MyPage extends React.Component {
|
export default class Preact extends React.Component {
|
||||||
static async getInitialProps () {
|
static async getInitialProps () {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const res = await fetch('https://api.github.com/repos/developit/preact')
|
const res = await fetch('https://api.github.com/repos/developit/preact')
|
||||||
|
|
Loading…
Reference in a new issue