mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Rename JavGame to Game because all games are not from or at Jav
This commit is contained in:
@@ -5,15 +5,15 @@ import { render } from "@testing-library/react"
|
||||
import { MemoryRouter } from "react-router-dom"
|
||||
|
||||
import mockStore from "../../../utils/mockStore"
|
||||
import JavGameList from "../index"
|
||||
import GameList from "../index"
|
||||
|
||||
describe("<List />", () => {
|
||||
const renderHelper = (reducer = { readyStatus: "idle" }) => {
|
||||
const { dispatch, ProviderWithStore } = mockStore({ javGameList: reducer })
|
||||
const { dispatch, ProviderWithStore } = mockStore({ gameList: reducer })
|
||||
const { container } = render(
|
||||
<ProviderWithStore>
|
||||
<MemoryRouter>
|
||||
<JavGameList ids={[5]} />
|
||||
<GameList ids={[5]} />
|
||||
</MemoryRouter>
|
||||
</ProviderWithStore>
|
||||
)
|
||||
@@ -39,9 +39,6 @@ describe("<List />", () => {
|
||||
bggPhoto:
|
||||
"https://cf.geekdo-images.com/thumb/img/lzczxR5cw7an7tRWeHdOrRtLyes=/fit-in/200x150/pic772547.jpg",
|
||||
bggId: 432,
|
||||
copies: 1,
|
||||
lendAvailability: 1,
|
||||
notStored: 0,
|
||||
ean: "3421272101313",
|
||||
},
|
||||
},
|
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`<List /> renders 1`] = `
|
||||
<div
|
||||
class="JavGameList"
|
||||
class="GameList"
|
||||
>
|
||||
<h4>
|
||||
Jeux JAV
|
@@ -10,14 +10,14 @@ interface Props {
|
||||
ids: EntityId[]
|
||||
}
|
||||
|
||||
const JavGameList = ({ ids }: Props) => {
|
||||
const { entities: jeuxJav } = useSelector((state: AppState) => state.javGameList, shallowEqual)
|
||||
const GameList = ({ ids }: Props) => {
|
||||
const { entities: jeux } = useSelector((state: AppState) => state.gameList, shallowEqual)
|
||||
return (
|
||||
<div className={styles.JavGameList}>
|
||||
<div className={styles.GameList}>
|
||||
<h4>Jeux JAV</h4>
|
||||
<ul>
|
||||
{ids.map((id) => {
|
||||
const jeu = jeuxJav[id]
|
||||
const jeu = jeux[id]
|
||||
if (!jeu) {
|
||||
return <li key={id}>Le jeu #{id} n'existe pas</li>
|
||||
}
|
||||
@@ -33,4 +33,4 @@ const JavGameList = ({ ids }: Props) => {
|
||||
)
|
||||
}
|
||||
|
||||
export default memo(JavGameList)
|
||||
export default memo(GameList)
|
@@ -1,6 +1,6 @@
|
||||
@import "../../theme/variables";
|
||||
|
||||
.JavGameList {
|
||||
.GameList {
|
||||
color: $color-white;
|
||||
|
||||
ul {
|
@@ -1,6 +1,6 @@
|
||||
import AnnouncementLink from "./AnnouncementLink"
|
||||
import ErrorBoundary from "./ErrorBoundary"
|
||||
import JavGameList from "./JavGameList"
|
||||
import GameList from "./GameList"
|
||||
import Loading from "./Loading"
|
||||
import LoginForm from "./LoginForm"
|
||||
import Notifications, { fetchFor as fetchForNotifications } from "./Notifications"
|
||||
@@ -16,7 +16,7 @@ import WishAdd from "./WishAdd"
|
||||
export {
|
||||
AnnouncementLink,
|
||||
ErrorBoundary,
|
||||
JavGameList,
|
||||
GameList,
|
||||
Loading,
|
||||
LoginForm,
|
||||
Notifications,
|
||||
|
Reference in New Issue
Block a user