-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into update-oazapfts
- Loading branch information
Showing
86 changed files
with
14,593 additions
and
15,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
"singleQuote": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
nodeLinker: node-modules | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: '@yarnpkg/plugin-workspace-tools' | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: '@yarnpkg/plugin-version' | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.4.cjs | ||
yarnPath: .yarn/releases/yarn-4.1.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
import { useGetPokemonByNameQuery } from './services/pokemon' | ||
|
||
export const Pokemon = ({ | ||
name, | ||
pollingInterval, | ||
}: { | ||
name: string | ||
pollingInterval: number | ||
}) => { | ||
const { data, error, isLoading, isFetching } = useGetPokemonByNameQuery( | ||
name, | ||
{ | ||
pollingInterval, | ||
}, | ||
) | ||
|
||
return ( | ||
<> | ||
{error ? ( | ||
<>Oh no, there was an error</> | ||
) : isLoading ? ( | ||
<>Loading...</> | ||
) : data ? ( | ||
<> | ||
<h3> | ||
{data.species.name} {isFetching ? '...' : ''} | ||
</h3> | ||
<img src={data.sprites.front_shiny} alt={data.species.name} /> | ||
</> | ||
) : null} | ||
</> | ||
) | ||
} | ||
import { useGetPokemonByNameQuery } from './services/pokemon' | ||
|
||
export const Pokemon = ({ | ||
name, | ||
pollingInterval, | ||
}: { | ||
name: string | ||
pollingInterval: number | ||
}) => { | ||
const { data, error, isLoading, isFetching } = useGetPokemonByNameQuery( | ||
name, | ||
{ | ||
pollingInterval, | ||
}, | ||
) | ||
|
||
return ( | ||
<> | ||
{error ? ( | ||
<>Oh no, there was an error</> | ||
) : isLoading ? ( | ||
<>Loading...</> | ||
) : data ? ( | ||
<> | ||
<h3> | ||
{data.species.name} {isFetching ? '...' : ''} | ||
</h3> | ||
<img src={data.sprites.front_shiny} alt={data.species.name} /> | ||
</> | ||
) : null} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' | ||
|
||
export const pokemonApi = createApi({ | ||
reducerPath: 'pokemonApi', | ||
baseQuery: fetchBaseQuery({ baseUrl: 'https://pokeapi.co/api/v2/' }), | ||
tagTypes: [], | ||
endpoints: (builder) => ({ | ||
getPokemonByName: builder.query({ | ||
query: (name: string) => `pokemon/${name}`, | ||
}), | ||
}), | ||
}) | ||
|
||
// Export hooks for usage in functional components | ||
export const { useGetPokemonByNameQuery } = pokemonApi | ||
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' | ||
|
||
export const pokemonApi = createApi({ | ||
reducerPath: 'pokemonApi', | ||
baseQuery: fetchBaseQuery({ baseUrl: 'https://pokeapi.co/api/v2/' }), | ||
tagTypes: [], | ||
endpoints: (builder) => ({ | ||
getPokemonByName: builder.query({ | ||
query: (name: string) => `pokemon/${name}`, | ||
}), | ||
}), | ||
}) | ||
|
||
// Export hooks for usage in functional components | ||
export const { useGetPokemonByNameQuery } = pokemonApi |
8 changes: 4 additions & 4 deletions
8
examples/query/react/authentication-with-extrareducers/src/mocks/browser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { setupWorker } from 'msw' | ||
import { handlers } from './handlers' | ||
|
||
export const worker = setupWorker(...handlers) | ||
import { setupWorker } from 'msw' | ||
import { handlers } from './handlers' | ||
|
||
export const worker = setupWorker(...handlers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { setupWorker } from 'msw' | ||
import { handlers } from './handlers' | ||
|
||
export const worker = setupWorker(...handlers) | ||
import { setupWorker } from 'msw' | ||
import { handlers } from './handlers' | ||
|
||
export const worker = setupWorker(...handlers) |
Oops, something went wrong.