theo_lafond_react_ci_cd 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.cjs +6 -0
- package/cypress.config.js +12 -0
- package/dist/App.css +35 -0
- package/dist/App.js +147 -0
- package/dist/assets/react.svg +1 -0
- package/dist/components/PersonForm.css +63 -0
- package/dist/components/PersonForm.js +312 -0
- package/dist/domain/module.js +33 -0
- package/dist/domain/services/personService.js +126 -0
- package/dist/domain/validator.js +143 -0
- package/dist/index.css +64 -0
- package/dist/index.js +13 -0
- package/dist/main.js +11 -0
- package/dist/pages/Home.css +57 -0
- package/dist/pages/Home.js +102 -0
- package/dist/pages/Register.css +28 -0
- package/dist/pages/Register.js +40 -0
- package/dist/utils/errorMessages.js +46 -0
- package/eslint.config.js +29 -0
- package/jest.config.cjs +9 -0
- package/jsdoc.json +8 -0
- package/package.json +50 -0
- package/public/docs/App.jsx.html +114 -0
- package/public/docs/components_PersonForm.jsx.html +282 -0
- package/public/docs/domain_module.js.html +81 -0
- package/public/docs/domain_personService.js.html +69 -0
- package/public/docs/domain_validator.js.html +190 -0
- package/public/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
- package/public/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/public/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
- package/public/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/public/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
- package/public/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/public/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-Light-webfont.svg +1831 -0
- package/public/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/public/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
- package/public/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/public/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/public/docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
- package/public/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/public/docs/global.html +2439 -0
- package/public/docs/module-App.html +362 -0
- package/public/docs/module-Home.html +373 -0
- package/public/docs/module-PersonForm.html +723 -0
- package/public/docs/module-Register.html +281 -0
- package/public/docs/module.js.html +81 -0
- package/public/docs/pages_Home.jsx.html +106 -0
- package/public/docs/pages_Register.jsx.html +78 -0
- package/public/docs/scripts/linenumber.js +25 -0
- package/public/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/public/docs/scripts/prettify/lang-css.js +2 -0
- package/public/docs/scripts/prettify/prettify.js +28 -0
- package/public/docs/styles/jsdoc-default.css +358 -0
- package/public/docs/styles/prettify-jsdoc.css +111 -0
- package/public/docs/styles/prettify-tomorrow.css +132 -0
- package/public/docs/utils_errorMessages.js.html +87 -0
- package/public/docs/validator.js.html +179 -0
- package/public/vite.svg +1 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Module: Register</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Module: Register</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
|
|
29
|
+
<header>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<article>
|
|
38
|
+
<div class="container-overview">
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<div class="description">Register Component
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<h5>Parameters:</h5>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<table class="params">
|
|
61
|
+
<thead>
|
|
62
|
+
<tr>
|
|
63
|
+
|
|
64
|
+
<th>Name</th>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<th>Type</th>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<th class="last">Description</th>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
|
|
77
|
+
<tbody>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<tr>
|
|
81
|
+
|
|
82
|
+
<td class="name"><code>props</code></td>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<td class="type">
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<span class="param-type">Object</span>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</td>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<td class="description last">
|
|
99
|
+
<h6>Properties</h6>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<table class="params">
|
|
103
|
+
<thead>
|
|
104
|
+
<tr>
|
|
105
|
+
|
|
106
|
+
<th>Name</th>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<th>Type</th>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<th class="last">Description</th>
|
|
116
|
+
</tr>
|
|
117
|
+
</thead>
|
|
118
|
+
|
|
119
|
+
<tbody>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<tr>
|
|
123
|
+
|
|
124
|
+
<td class="name"><code>addPerson</code></td>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<td class="type">
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<span class="param-type">function</span>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</td>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<td class="description last">Callback to add a person</td>
|
|
141
|
+
</tr>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</tbody>
|
|
145
|
+
</table>
|
|
146
|
+
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
</tbody>
|
|
152
|
+
</table>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<dl class="details">
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<dt class="tag-source">Source:</dt>
|
|
187
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
188
|
+
<a href="pages_Register.jsx.html">pages/Register.jsx</a>, <a href="pages_Register.jsx.html#line5">line 5</a>
|
|
189
|
+
</li></ul></dd>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</dl>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<h5>Returns:</h5>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<dl>
|
|
219
|
+
<dt>
|
|
220
|
+
Type
|
|
221
|
+
</dt>
|
|
222
|
+
<dd>
|
|
223
|
+
|
|
224
|
+
<span class="param-type">JSX.Element</span>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
</dd>
|
|
228
|
+
</dl>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
</article>
|
|
260
|
+
|
|
261
|
+
</section>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<nav>
|
|
269
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-App.html">App</a></li><li><a href="module-Home.html">Home</a></li><li><a href="module-PersonForm.html">PersonForm</a></li><li><a href="module-Register.html">Register</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addPerson">addPerson</a></li><li><a href="global.html#calculateAge">calculateAge</a></li><li><a href="global.html#errorMessages">errorMessages</a></li><li><a href="global.html#getErrorMessage">getErrorMessage</a></li><li><a href="global.html#validateAge">validateAge</a></li><li><a href="global.html#validateCity">validateCity</a></li><li><a href="global.html#validateEmail">validateEmail</a></li><li><a href="global.html#validateName">validateName</a></li><li><a href="global.html#validatePerson">validatePerson</a></li><li><a href="global.html#validateZipCode">validateZipCode</a></li></ul>
|
|
270
|
+
</nav>
|
|
271
|
+
|
|
272
|
+
<br class="clear">
|
|
273
|
+
|
|
274
|
+
<footer>
|
|
275
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Feb 20 2026 09:18:59 GMT+0100 (heure normale d’Europe centrale)
|
|
276
|
+
</footer>
|
|
277
|
+
|
|
278
|
+
<script> prettyPrint(); </script>
|
|
279
|
+
<script src="scripts/linenumber.js"> </script>
|
|
280
|
+
</body>
|
|
281
|
+
</html>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: module.js</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: module.js</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>/**
|
|
30
|
+
* Calculate a person's age in years
|
|
31
|
+
*
|
|
32
|
+
* @param {object} p An object representing a person, implementing a birth Date parameter.
|
|
33
|
+
* @returns {number} The age in years of p.
|
|
34
|
+
*/
|
|
35
|
+
export function calculateAge(p){
|
|
36
|
+
if(!p){
|
|
37
|
+
throw new Error("missing param p")
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (typeof p !== "object") {
|
|
41
|
+
throw new TypeError("param p must be an object");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!("birth" in p)) {
|
|
45
|
+
throw new Error("missing birth field in param p");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!(p.birth instanceof Date)) {
|
|
49
|
+
throw new TypeError("birth must be a Date object");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (Number.isNaN(p.birth.getTime())) {
|
|
53
|
+
throw new TypeError("invalid birth date");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let dateDiff = new Date(Date.now() - p.birth.getTime());
|
|
57
|
+
let age = Math.abs(dateDiff.getUTCFullYear() - 1970);
|
|
58
|
+
return age;
|
|
59
|
+
}</code></pre>
|
|
60
|
+
</article>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<nav>
|
|
69
|
+
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#calculateAge">calculateAge</a></li><li><a href="global.html#validateAge">validateAge</a></li><li><a href="global.html#validateCity">validateCity</a></li><li><a href="global.html#validateEmail">validateEmail</a></li><li><a href="global.html#validateName">validateName</a></li><li><a href="global.html#validatePerson">validatePerson</a></li><li><a href="global.html#validateZipCode">validateZipCode</a></li></ul>
|
|
70
|
+
</nav>
|
|
71
|
+
|
|
72
|
+
<br class="clear">
|
|
73
|
+
|
|
74
|
+
<footer>
|
|
75
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Thu Feb 19 2026 12:22:47 GMT+0100 (heure normale d’Europe centrale)
|
|
76
|
+
</footer>
|
|
77
|
+
|
|
78
|
+
<script> prettyPrint(); </script>
|
|
79
|
+
<script src="scripts/linenumber.js"> </script>
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: pages/Home.jsx</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: pages/Home.jsx</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>import React from 'react';
|
|
30
|
+
import { useNavigate } from 'react-router-dom';
|
|
31
|
+
import './Home.css';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Home Component
|
|
35
|
+
*
|
|
36
|
+
* Displays the list of registered persons and a button to navigate to the registration form.
|
|
37
|
+
*
|
|
38
|
+
* @module Home
|
|
39
|
+
* @component
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} props
|
|
42
|
+
* @param {Array<Object>} props.persons - Array of person objects to display
|
|
43
|
+
*
|
|
44
|
+
* @returns {JSX.Element}
|
|
45
|
+
*/
|
|
46
|
+
export default function Home({persons}) {
|
|
47
|
+
const navigate = useNavigate();
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Navigate to the registration form.
|
|
51
|
+
* @module Home
|
|
52
|
+
* @function handleGoToForm
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
const handleGoToForm = () => {
|
|
56
|
+
navigate('/register');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div className="home-container">
|
|
61
|
+
<div className="card">
|
|
62
|
+
<h1>Bienvenue</h1>
|
|
63
|
+
<p>Nombre d'utilisateurs inscrits : <strong data-cy="user-count">{persons.length}</strong></p>
|
|
64
|
+
<button data-cy="nav-register" onClick={handleGoToForm}>
|
|
65
|
+
Inscription
|
|
66
|
+
</button>
|
|
67
|
+
<div className="user-table-container">
|
|
68
|
+
<h3>Liste des utilisateurs inscrits</h3>
|
|
69
|
+
{persons.length > 0 ? (
|
|
70
|
+
<ul data-cy="user-list" className="user-list">
|
|
71
|
+
{persons.map((person, index) => (
|
|
72
|
+
<li key={index}>
|
|
73
|
+
{person.firstName} {person.lastName}
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
) : (
|
|
78
|
+
<p data-cy="no-users">Aucun utilisateur inscrit pour l'instant.</p>
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
}</code></pre>
|
|
85
|
+
</article>
|
|
86
|
+
</section>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<nav>
|
|
94
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-App.html">App</a></li><li><a href="module-Home.html">Home</a></li><li><a href="module-PersonForm.html">PersonForm</a></li><li><a href="module-Register.html">Register</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addPerson">addPerson</a></li><li><a href="global.html#calculateAge">calculateAge</a></li><li><a href="global.html#errorMessages">errorMessages</a></li><li><a href="global.html#getErrorMessage">getErrorMessage</a></li><li><a href="global.html#validateAge">validateAge</a></li><li><a href="global.html#validateCity">validateCity</a></li><li><a href="global.html#validateEmail">validateEmail</a></li><li><a href="global.html#validateName">validateName</a></li><li><a href="global.html#validatePerson">validatePerson</a></li><li><a href="global.html#validateZipCode">validateZipCode</a></li></ul>
|
|
95
|
+
</nav>
|
|
96
|
+
|
|
97
|
+
<br class="clear">
|
|
98
|
+
|
|
99
|
+
<footer>
|
|
100
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Feb 20 2026 09:18:58 GMT+0100 (heure normale d’Europe centrale)
|
|
101
|
+
</footer>
|
|
102
|
+
|
|
103
|
+
<script> prettyPrint(); </script>
|
|
104
|
+
<script src="scripts/linenumber.js"> </script>
|
|
105
|
+
</body>
|
|
106
|
+
</html>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>JSDoc: Source: pages/Register.jsx</title>
|
|
6
|
+
|
|
7
|
+
<script src="scripts/prettify/prettify.js"> </script>
|
|
8
|
+
<script src="scripts/prettify/lang-css.js"> </script>
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
13
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
|
|
18
|
+
<div id="main">
|
|
19
|
+
|
|
20
|
+
<h1 class="page-title">Source: pages/Register.jsx</h1>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<article>
|
|
29
|
+
<pre class="prettyprint source linenums"><code>import PersonForm from "../components/PersonForm"
|
|
30
|
+
import { Link } from 'react-router-dom';
|
|
31
|
+
import './Register.css'
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Register Component
|
|
35
|
+
*
|
|
36
|
+
* Wrapper page for PersonForm. Passes addPerson callback to the form
|
|
37
|
+
* and provides a link back to Home.
|
|
38
|
+
*
|
|
39
|
+
* @module Register
|
|
40
|
+
* @component
|
|
41
|
+
*
|
|
42
|
+
* @param {Object} props
|
|
43
|
+
* @param {function(Object): void} props.addPerson - Callback to add a person
|
|
44
|
+
*
|
|
45
|
+
* @returns {JSX.Element}
|
|
46
|
+
*/
|
|
47
|
+
export default function Register({addPerson}) {
|
|
48
|
+
return (
|
|
49
|
+
<div className="register-container">
|
|
50
|
+
<PersonForm addPerson={addPerson}/>
|
|
51
|
+
<Link to="/">
|
|
52
|
+
<button data-cy="back-home" className="back-button">Retour à l'accueil</button>
|
|
53
|
+
</Link>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}</code></pre>
|
|
57
|
+
</article>
|
|
58
|
+
</section>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<nav>
|
|
66
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-App.html">App</a></li><li><a href="module-Home.html">Home</a></li><li><a href="module-PersonForm.html">PersonForm</a></li><li><a href="module-Register.html">Register</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addPerson">addPerson</a></li><li><a href="global.html#calculateAge">calculateAge</a></li><li><a href="global.html#errorMessages">errorMessages</a></li><li><a href="global.html#getErrorMessage">getErrorMessage</a></li><li><a href="global.html#validateAge">validateAge</a></li><li><a href="global.html#validateCity">validateCity</a></li><li><a href="global.html#validateEmail">validateEmail</a></li><li><a href="global.html#validateName">validateName</a></li><li><a href="global.html#validatePerson">validatePerson</a></li><li><a href="global.html#validateZipCode">validateZipCode</a></li></ul>
|
|
67
|
+
</nav>
|
|
68
|
+
|
|
69
|
+
<br class="clear">
|
|
70
|
+
|
|
71
|
+
<footer>
|
|
72
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Feb 20 2026 09:18:58 GMT+0100 (heure normale d’Europe centrale)
|
|
73
|
+
</footer>
|
|
74
|
+
|
|
75
|
+
<script> prettyPrint(); </script>
|
|
76
|
+
<script src="scripts/linenumber.js"> </script>
|
|
77
|
+
</body>
|
|
78
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*global document */
|
|
2
|
+
(() => {
|
|
3
|
+
const source = document.getElementsByClassName('prettyprint source linenums');
|
|
4
|
+
let i = 0;
|
|
5
|
+
let lineNumber = 0;
|
|
6
|
+
let lineId;
|
|
7
|
+
let lines;
|
|
8
|
+
let totalLines;
|
|
9
|
+
let anchorHash;
|
|
10
|
+
|
|
11
|
+
if (source && source[0]) {
|
|
12
|
+
anchorHash = document.location.hash.substring(1);
|
|
13
|
+
lines = source[0].getElementsByTagName('li');
|
|
14
|
+
totalLines = lines.length;
|
|
15
|
+
|
|
16
|
+
for (; i < totalLines; i++) {
|
|
17
|
+
lineNumber++;
|
|
18
|
+
lineId = `line${lineNumber}`;
|
|
19
|
+
lines[i].id = lineId;
|
|
20
|
+
if (lineId === anchorHash) {
|
|
21
|
+
lines[i].className += ' selected';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
})();
|