mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Rename all french to english
This commit is contained in:
35
src/components/VolunteerInfo/__tests__/VolunteerInfo.tsx
Executable file
35
src/components/VolunteerInfo/__tests__/VolunteerInfo.tsx
Executable file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @jest-environment jsdom
|
||||
*/
|
||||
import { render } from "@testing-library/react"
|
||||
import { MemoryRouter } from "react-router-dom"
|
||||
|
||||
import VolunteerInfo from "../index"
|
||||
|
||||
describe("<VolunteerInfo />", () => {
|
||||
it("renders", () => {
|
||||
const tree = render(
|
||||
<MemoryRouter>
|
||||
<VolunteerInfo
|
||||
item={{
|
||||
id: 1,
|
||||
firstname: "Aupeix",
|
||||
lastname: "Amélie",
|
||||
email: "pakouille.lakouille@yahoo.fr",
|
||||
mobile: "0675650392",
|
||||
photo: "images/volunteers/$taille/amélie_aupeix.jpg",
|
||||
food: "Végétarien",
|
||||
adult: 1,
|
||||
privileges: 0,
|
||||
active: 0,
|
||||
comment: "",
|
||||
timestamp: "0000-00-00",
|
||||
password: "$2y$10$fSxY9AIuxSiEjwF.J3eXGubIxUPkdq9d5fqpbl8ASimSjNj4SR.9O",
|
||||
}}
|
||||
/>
|
||||
</MemoryRouter>
|
||||
).container.firstChild
|
||||
|
||||
expect(tree).toMatchSnapshot()
|
||||
})
|
||||
})
|
@@ -0,0 +1,21 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<VolunteerInfo /> renders 1`] = `
|
||||
<div
|
||||
class="VolunteerCard"
|
||||
>
|
||||
<h4>
|
||||
Volunteer Info
|
||||
</h4>
|
||||
<ul>
|
||||
<li>
|
||||
Prénom:
|
||||
Aupeix
|
||||
</li>
|
||||
<li>
|
||||
Nom:
|
||||
Amélie
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
`;
|
20
src/components/VolunteerInfo/index.tsx
Executable file
20
src/components/VolunteerInfo/index.tsx
Executable file
@@ -0,0 +1,20 @@
|
||||
import { memo } from "react"
|
||||
|
||||
import { Volunteer } from "../../services/volunteers"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
interface Props {
|
||||
item: Volunteer
|
||||
}
|
||||
|
||||
const VolunteerInfo = ({ item }: Props) => (
|
||||
<div className={styles.VolunteerCard}>
|
||||
<h4>Volunteer Info</h4>
|
||||
<ul>
|
||||
<li>Prénom: {item.firstname}</li>
|
||||
<li>Nom: {item.lastname}</li>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
||||
export default memo(VolunteerInfo)
|
9
src/components/VolunteerInfo/styles.module.scss
Executable file
9
src/components/VolunteerInfo/styles.module.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
.volunteer-card {
|
||||
ul {
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user