diff --git a/package.json b/package.json index 2ccf5c3..c202fde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sample.react.rtk", - "version": "0.1.0", + "version": "0.0.1", "homepage": "./", "private": true, "dependencies": { diff --git a/src/components/App.tsx b/src/components/App.tsx index 37fb7af..2a0cf81 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,3 +1,4 @@ +import { type PokemonListItem, useFetchPokemonsQuery } from 'features/api/pokemon' import { type Post, useFetchPostsQuery } from 'features/api/posts' import { type User, useFetchUsersQuery } from 'features/api/users' import ItemList from 'shared/ItemList' @@ -5,28 +6,27 @@ import UserItem from './User' import PostItem from './Post' import PokemonItem from './Pokemon' import Notify from './Notify' -import { PokemonListItem, useFetchPokemonsQuery } from 'features/api/pokemon' -const renderUser = (item: User) => -const renderPost = (item: Post) => const renderPokemon = (item: PokemonListItem) => +const renderPost = (item: Post) => +const renderUser = (item: User) => const App = () => { return (
-

Users

- - fetchItems={useFetchUsersQuery} - renderItem={renderUser} - /> -

Pokemon

fetchItems={useFetchPokemonsQuery} renderItem={renderPokemon} /> +

Users

+ + fetchItems={useFetchUsersQuery} + renderItem={renderUser} + /> +

Posts

fetchItems={useFetchPostsQuery}