Skip to content

Commit

Permalink
chore(version): set version and code beauty
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo committed Oct 11, 2023
1 parent b5024ce commit 2f29d19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sample.react.rtk",
"version": "0.1.0",
"version": "0.0.1",
"homepage": "./",
"private": true,
"dependencies": {
Expand Down
18 changes: 9 additions & 9 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
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'
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) => <UserItem item={item} />
const renderPost = (item: Post) => <PostItem item={item} />
const renderPokemon = (item: PokemonListItem) => <PokemonItem item={item} />
const renderPost = (item: Post) => <PostItem item={item} />
const renderUser = (item: User) => <UserItem item={item} />

const App = () => {
return (
<main style={{ padding: '40px 100px' }}>

<h3>Users</h3>
<ItemList<User>
fetchItems={useFetchUsersQuery}
renderItem={renderUser}
/>

<h3>Pokemon</h3>
<ItemList<PokemonListItem>
fetchItems={useFetchPokemonsQuery}
renderItem={renderPokemon}
/>

<h3>Users</h3>
<ItemList<User>
fetchItems={useFetchUsersQuery}
renderItem={renderUser}
/>

<h3>Posts</h3>
<ItemList<Post>
fetchItems={useFetchPostsQuery}
Expand Down

0 comments on commit 2f29d19

Please sign in to comment.