Skip to content

chore: remove isomorphic-unfetch from examples #1389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions examples/api-hooks/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import fetch from 'isomorphic-unfetch'

export default async function (...args) {
export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
}
1 change: 0 additions & 1 deletion examples/api-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
4 changes: 1 addition & 3 deletions examples/api-hooks/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper', 'vuejs/vuepress', 'rust-lang/rust', 'zeit/next.js'
]
Expand All @@ -14,7 +12,7 @@ export default (req, res) => {
res.json(data)
}, 2000)
})

return
}
setTimeout(() => {
Expand Down
2 changes: 0 additions & 2 deletions examples/autocomplete-suggestions/libs/fetcher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/autocomplete-suggestions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"dependencies": {
"@reach/combobox": "0.16.1",
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/basic-typescript/libs/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher<JSON = any>(
input: RequestInfo,
init?: RequestInit
Expand Down
1 change: 0 additions & 1 deletion examples/basic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/basic-typescript/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper',
'vuejs/vuepress',
Expand Down
2 changes: 0 additions & 2 deletions examples/basic/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/basic/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper', 'vuejs/vuepress', 'rust-lang/rust', 'zeit/next.js'
]
Expand Down
2 changes: 0 additions & 2 deletions examples/focus-revalidate/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/focus-revalidate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/global-fetcher/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/global-fetcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/global-fetcher/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper', 'vuejs/vuepress', 'rust-lang/rust', 'zeit/next.js'
]
Expand Down
2 changes: 0 additions & 2 deletions examples/infinite-scroll/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/infinite-scroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/infinite/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/infinite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/optimistic-ui-immer/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/optimistic-ui-immer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"dependencies": {
"immer": "9.0.5",
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/optimistic-ui/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/optimistic-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/prefetch-preload/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/prefetch-preload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/prefetch-preload/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper', 'vuejs/vuepress', 'rust-lang/rust', 'zeit/next.js'
]
Expand Down
2 changes: 0 additions & 2 deletions examples/refetch-interval/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/refetch-interval/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/server-render/libs/fetcher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/server-render/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/suspense/libs/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

export default async function fetcher(...args) {
const res = await fetch(...args)
return res.json()
Expand Down
1 change: 0 additions & 1 deletion examples/suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "3.1.0",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 0 additions & 2 deletions examples/suspense/pages/api/data.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import fetch from 'isomorphic-unfetch'

const projects = [
'facebook/flipper',
'vuejs/vuepress',
Expand Down