Skip to content

Commit 01552da

Browse files
Merge pull request #42 from commitd/stuarthendren/issue40
fix(docs): fixes useDebounce story
2 parents fffa823 + 3aa59a8 commit 01552da

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"@babel/core": "^7.12.3",
9494
"@commitlint/cli": "^16.2.3",
9595
"@commitlint/config-conventional": "^16.2.1",
96-
"@committed/components": "^7.0.1",
96+
"@committed/components": "^7.0.2",
9797
"@fontsource/dosis": "^4.5.7",
9898
"@fontsource/inter": "^4.5.7",
9999
"@size-limit/preset-small-lib": "^4.6.2",
@@ -136,4 +136,4 @@
136136
"typescript": "^4.6.3"
137137
},
138138
"dependencies": {}
139-
}
139+
}

src/useDebounce/useDebounce.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ export const Usage = () => {
8787
const { data: countries } = useSwr<
8888
Array<{ name: string; alpha3Code: string }>
8989
>(
90-
['https://restcountries.eu/rest/v2/name/', debouncedName],
90+
['https://restcountries.com/v2/name/', debouncedName],
9191
(url: string, name: string) => {
9292
setCalls(calls + 1)
93-
return fetch(`${url}${name}`).then((res) => res.json())
93+
return fetch(`${url}${name.toLowerCase()}`).then((res) => res.json())
9494
},
9595
{ refreshInterval: 0, shouldRetryOnError: false }
9696
)
@@ -154,10 +154,10 @@ export const Flush = () => {
154154
const { data: countries } = useSwr<
155155
Array<{ name: string; alpha3Code: string; capital: string }>
156156
>(
157-
['https://restcountries.eu/rest/v2/capital/', debouncedName],
157+
['https://restcountries.com/v2/capital/', debouncedName],
158158
(url: string, name: string) => {
159159
setCalls(calls + 1)
160-
return fetch(`${url}${name}`).then((res) => res.json())
160+
return fetch(`${url}${name.toLowerCase()}`).then((res) => res.json())
161161
},
162162
{ refreshInterval: 0, shouldRetryOnError: false }
163163
)

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,10 +2170,10 @@
21702170
dependencies:
21712171
chalk "^4.0.0"
21722172

2173-
"@committed/components@^7.0.1":
2174-
version "7.0.1"
2175-
resolved "https://registry.yarnpkg.com/@committed/components/-/components-7.0.1.tgz#b0ff39f7c6a7dc364507a6c29c21a54cf0823e46"
2176-
integrity sha512-rMw2oCHqtA6mo41S73U+sR7o/bMYhKVw69F37dWnN/jhpKRP1evUgVbnGFbNLjwE0xhwY76JDfSRg3fxgQwAQg==
2173+
"@committed/components@^7.0.2":
2174+
version "7.0.2"
2175+
resolved "https://registry.yarnpkg.com/@committed/components/-/components-7.0.2.tgz#cb8ffb2e9b2f3d19a9ed5363cabeef63bfcee114"
2176+
integrity sha512-JcgAPXm88UnIAXCS57LkLKiRaEzCEhv8ctYiTNXRH9PAq5BH8ckDWk10Gm3RqK+lgixWr3dSroojLKg0za/CAw==
21772177
dependencies:
21782178
"@committed/hooks" "^0.5.0"
21792179
"@mdi/js" "^6.6.96"

0 commit comments

Comments
 (0)