@pplancq/react-template 1.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/.babelrc.js +1 -0
- package/.commitlintrc.js +1 -0
- package/.editorconfig +4 -0
- package/.env +36 -0
- package/.eslintrc.js +1 -0
- package/.gitattributes +1 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +1 -0
- package/.lintstagedrc.js +5 -0
- package/.postcssrc.js +1 -0
- package/.prettierrc.js +1 -0
- package/.stylelintrc.js +1 -0
- package/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/_gitignore +26 -0
- package/package.json +84 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/api/README.md +64 -0
- package/src/api/demoApi.ts +44 -0
- package/src/assets/README.md +51 -0
- package/src/assets/css/index.ts +2 -0
- package/src/assets/css/mainBody.css +4 -0
- package/src/assets/css/reset.css +131 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/templatePlugins.png +0 -0
- package/src/bootstrap.tsx +26 -0
- package/src/components/App/App.tsx +18 -0
- package/src/components/App/index.ts +1 -0
- package/src/components/Footer/Footer.module.css +4 -0
- package/src/components/Footer/Footer.tsx +16 -0
- package/src/components/Footer/__tests__/Footer.test.tsx +15 -0
- package/src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +21 -0
- package/src/components/Footer/index.ts +1 -0
- package/src/components/Header/Header.module.css +7 -0
- package/src/components/Header/Header.tsx +17 -0
- package/src/components/Header/__tests__/Header.test.tsx +15 -0
- package/src/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +35 -0
- package/src/components/Header/index.ts +1 -0
- package/src/components/README.md +34 -0
- package/src/components/TextInput/TextInput.tsx +24 -0
- package/src/components/TextInput/index.ts +1 -0
- package/src/config/README.md +61 -0
- package/src/config/index.ts +1 -0
- package/src/config/queryClientConfig.ts +3 -0
- package/src/forms/ProfileForm/ProfileForm.module.scss +10 -0
- package/src/forms/ProfileForm/ProfileForm.tsx +51 -0
- package/src/forms/ProfileForm/index.ts +1 -0
- package/src/forms/README.md +131 -0
- package/src/hooks/README.md +87 -0
- package/src/hooks/api/queryKey.ts +1 -0
- package/src/hooks/api/useDemoApi.ts +16 -0
- package/src/main.ts +3 -0
- package/src/pages/Demo/Demo.module.scss +184 -0
- package/src/pages/Demo/Demo.tsx +237 -0
- package/src/pages/Demo/ReactHookFormDemo/ReactHookFormDemo.module.css +32 -0
- package/src/pages/Demo/ReactHookFormDemo/ReactHookFormDemo.tsx +48 -0
- package/src/pages/Demo/ReactHookFormDemo/index.ts +1 -0
- package/src/pages/Demo/ReactHookFormDemo/routes.tsx +7 -0
- package/src/pages/Demo/ReactQueryDemo/ReactQueryDemo.module.scss +38 -0
- package/src/pages/Demo/ReactQueryDemo/ReactQueryDemo.tsx +55 -0
- package/src/pages/Demo/ReactQueryDemo/index.ts +1 -0
- package/src/pages/Demo/ReactQueryDemo/routes.tsx +7 -0
- package/src/pages/Demo/__tests__/Demo.test.tsx +15 -0
- package/src/pages/Demo/__tests__/__snapshots__/Demo.test.tsx.snap +555 -0
- package/src/pages/Demo/index.ts +1 -0
- package/src/pages/Demo/routes.tsx +8 -0
- package/src/pages/Error/Error.module.css +8 -0
- package/src/pages/Error/Error.tsx +22 -0
- package/src/pages/Error/index.ts +1 -0
- package/src/pages/Layout/Layout.tsx +12 -0
- package/src/pages/Layout/index.ts +1 -0
- package/src/pages/README.md +88 -0
- package/src/providers/QueryClientProvider/QueryClientProvider.tsx +16 -0
- package/src/providers/QueryClientProvider/index.ts +1 -0
- package/src/providers/README.md +115 -0
- package/src/providers/index.ts +1 -0
- package/src/providers/withProviders/index.ts +1 -0
- package/src/providers/withProviders/withProviders.tsx +18 -0
- package/src/react-app-env.d.ts +3 -0
- package/src/routing/README.md +80 -0
- package/src/routing/appRoutes.ts +5 -0
- package/src/routing/routerFactory.ts +10 -0
- package/src/routing/routes.tsx +13 -0
- package/src/types/README.md +61 -0
- package/src/types/demoApi.ts +9 -0
- package/src/types/profileTypes.ts +5 -0
- package/src/ui/README.md +141 -0
- package/src/ui/atoms/Input/Input.module.scss +32 -0
- package/src/ui/atoms/Input/Input.tsx +27 -0
- package/src/ui/atoms/Input/index.ts +1 -0
- package/src/ui/atoms/Logo/Logo.module.css +3 -0
- package/src/ui/atoms/Logo/Logo.tsx +11 -0
- package/src/ui/atoms/Logo/index.ts +1 -0
- package/src/ui/atoms/NavLink/NavLink.tsx +8 -0
- package/src/ui/atoms/NavLink/index.ts +1 -0
- package/src/ui/molecules/Navigation/Navigation.module.css +22 -0
- package/src/ui/molecules/Navigation/Navigation.tsx +25 -0
- package/src/ui/molecules/Navigation/index.ts +1 -0
- package/src/ui/organisms/Footer/Footer.module.css +10 -0
- package/src/ui/organisms/Footer/Footer.tsx +10 -0
- package/src/ui/organisms/Footer/index.ts +1 -0
- package/src/ui/organisms/Header/Header.module.css +17 -0
- package/src/ui/organisms/Header/Header.tsx +16 -0
- package/src/ui/organisms/Header/index.ts +1 -0
- package/src/ui/organisms/MainContent/MainContent.module.css +3 -0
- package/src/ui/organisms/MainContent/MainContent.tsx +6 -0
- package/src/ui/organisms/MainContent/index.ts +1 -0
- package/src/ui/templates/MainTemplate/MainTemplate.module.css +5 -0
- package/src/ui/templates/MainTemplate/MainTemplate.tsx +26 -0
- package/src/ui/templates/MainTemplate/index.ts +1 -0
- package/src/utils/README.md +68 -0
- package/tsconfig.json +32 -0
- package/vitest.config.mts +49 -0
- package/vitest.setup.ts +1 -0
- package/webpack.config.js +22 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useDemoApi } from '@Front/hooks/api/useDemoApi';
|
|
2
|
+
import classes from './ReactQueryDemo.module.scss';
|
|
3
|
+
|
|
4
|
+
export const ReactQueryDemo = () => {
|
|
5
|
+
const { result, isLoading, isError } = useDemoApi();
|
|
6
|
+
|
|
7
|
+
if (isError) {
|
|
8
|
+
return <div>Error fetching data</div>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className={classes.container}>
|
|
13
|
+
<h1 className={classes.title}>React Query</h1>
|
|
14
|
+
<hr className={classes.lineStyle} color="#00008f" />
|
|
15
|
+
|
|
16
|
+
<div className={classes.fieldsetStyle}>
|
|
17
|
+
<p className={classes.paragraph}>
|
|
18
|
+
React Query is a popular library for data management in React applications. It simplifies data query
|
|
19
|
+
management, caching, data invalidation, and loading state handling.
|
|
20
|
+
</p>
|
|
21
|
+
{isLoading ? (
|
|
22
|
+
<h1 className={classes.dataTitle}>Loading...</h1>
|
|
23
|
+
) : (
|
|
24
|
+
<>
|
|
25
|
+
<h1 className={classes.dataTitle}>React Query Data Fetched</h1>
|
|
26
|
+
<div className={classes.tableWrapper}>
|
|
27
|
+
<table>
|
|
28
|
+
<thead>
|
|
29
|
+
<tr>
|
|
30
|
+
<th>ID</th>
|
|
31
|
+
<th>First Name</th>
|
|
32
|
+
<th>Last Name</th>
|
|
33
|
+
<th>Age</th>
|
|
34
|
+
<th>Email</th>
|
|
35
|
+
</tr>
|
|
36
|
+
</thead>
|
|
37
|
+
<tbody>
|
|
38
|
+
{result?.map(eachResult => (
|
|
39
|
+
<tr key={eachResult.id}>
|
|
40
|
+
<td>{eachResult.id}</td>
|
|
41
|
+
<td>{eachResult.firstName}</td>
|
|
42
|
+
<td>{eachResult.lastName}</td>
|
|
43
|
+
<td>{eachResult.age}</td>
|
|
44
|
+
<td>{eachResult.email}</td>
|
|
45
|
+
</tr>
|
|
46
|
+
))}
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
49
|
+
</div>
|
|
50
|
+
</>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { reactQueryDemoRoutes } from './routes';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import { BrowserRouter as Router } from 'react-router-dom';
|
|
3
|
+
import { Demo } from '../Demo';
|
|
4
|
+
|
|
5
|
+
describe('Demo Component', () => {
|
|
6
|
+
it('should render the Demo component correctly', () => {
|
|
7
|
+
const { container } = render(
|
|
8
|
+
<Router>
|
|
9
|
+
<Demo />
|
|
10
|
+
</Router>,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
expect(container).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`Demo Component > should render the Demo component correctly 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="_container_85a2c3"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="_bigTitleStyle_85a2c3"
|
|
10
|
+
>
|
|
11
|
+
Welcome to Your React Starter Kit
|
|
12
|
+
<span>
|
|
13
|
+
Welcome
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
<div
|
|
17
|
+
class="_foo_85a2c3"
|
|
18
|
+
>
|
|
19
|
+
FlexBlug
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
class="_paragraphContainer_85a2c3"
|
|
23
|
+
>
|
|
24
|
+
<h1
|
|
25
|
+
class="_titleStyle_85a2c3"
|
|
26
|
+
>
|
|
27
|
+
Overview
|
|
28
|
+
</h1>
|
|
29
|
+
<div
|
|
30
|
+
class="_infoSection_85a2c3"
|
|
31
|
+
>
|
|
32
|
+
<span
|
|
33
|
+
class="_centredText_85a2c3"
|
|
34
|
+
>
|
|
35
|
+
<p
|
|
36
|
+
class="_paragraphStyle_85a2c3"
|
|
37
|
+
>
|
|
38
|
+
<span
|
|
39
|
+
class="_highlight_85a2c3"
|
|
40
|
+
>
|
|
41
|
+
Congratulations
|
|
42
|
+
</span>
|
|
43
|
+
on starting your project with our
|
|
44
|
+
|
|
45
|
+
<span
|
|
46
|
+
class="_highlight_85a2c3"
|
|
47
|
+
>
|
|
48
|
+
React Starter Kit!
|
|
49
|
+
</span>
|
|
50
|
+
This kit is designed to jumpstart your development with a well-organized project structure and pre-configured tools.
|
|
51
|
+
</p>
|
|
52
|
+
<p
|
|
53
|
+
class="_paragraphStyle_85a2c3"
|
|
54
|
+
>
|
|
55
|
+
Below, you'll find an overview of the key features, tools, and architecture used in this starter kit.
|
|
56
|
+
</p>
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<img
|
|
61
|
+
alt="template"
|
|
62
|
+
class="_imagePlace_85a2c3"
|
|
63
|
+
src="/src/assets/images/templatePlugins.png"
|
|
64
|
+
/>
|
|
65
|
+
<div
|
|
66
|
+
class="_paragraphContainer_85a2c3"
|
|
67
|
+
>
|
|
68
|
+
<h1
|
|
69
|
+
class="_titleStyle_85a2c3"
|
|
70
|
+
>
|
|
71
|
+
Objective
|
|
72
|
+
</h1>
|
|
73
|
+
<div
|
|
74
|
+
class="_infoSection_85a2c3"
|
|
75
|
+
>
|
|
76
|
+
<p
|
|
77
|
+
class="_paragraphStyle_85a2c3"
|
|
78
|
+
>
|
|
79
|
+
The goal of this
|
|
80
|
+
<span
|
|
81
|
+
class="_boldText_85a2c3"
|
|
82
|
+
>
|
|
83
|
+
starter kit
|
|
84
|
+
</span>
|
|
85
|
+
is to enable you to quickly start a new project with all the necessary tools.
|
|
86
|
+
</p>
|
|
87
|
+
<p
|
|
88
|
+
class="_paragraphStyle_85a2c3"
|
|
89
|
+
>
|
|
90
|
+
Additionally, this
|
|
91
|
+
<span
|
|
92
|
+
class="_boldText_85a2c3"
|
|
93
|
+
>
|
|
94
|
+
starter kit
|
|
95
|
+
</span>
|
|
96
|
+
offers a robust set of options for structuring your
|
|
97
|
+
<span
|
|
98
|
+
class="_boldText_85a2c3"
|
|
99
|
+
>
|
|
100
|
+
React application
|
|
101
|
+
</span>
|
|
102
|
+
, providing flexibility to adapt to various project architectures.
|
|
103
|
+
</p>
|
|
104
|
+
<p
|
|
105
|
+
class="_paragraphStyle_85a2c3"
|
|
106
|
+
>
|
|
107
|
+
It has been thoughtfully designed not only to expedite the initial setup but also to streamline the implementation of
|
|
108
|
+
<span
|
|
109
|
+
class="_highlight_85a2c3"
|
|
110
|
+
>
|
|
111
|
+
Micro-Frontends
|
|
112
|
+
</span>
|
|
113
|
+
, making it a versatile solution for projects of different scales. (for more details check the
|
|
114
|
+
|
|
115
|
+
<span
|
|
116
|
+
class="_highlight_85a2c3"
|
|
117
|
+
>
|
|
118
|
+
README.md
|
|
119
|
+
</span>
|
|
120
|
+
file)
|
|
121
|
+
</p>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
class="_paragraphContainer_85a2c3"
|
|
126
|
+
>
|
|
127
|
+
<h1
|
|
128
|
+
class="_titleStyle_85a2c3"
|
|
129
|
+
>
|
|
130
|
+
Features
|
|
131
|
+
</h1>
|
|
132
|
+
<div
|
|
133
|
+
class="_infoSection_85a2c3"
|
|
134
|
+
>
|
|
135
|
+
<p
|
|
136
|
+
class="_paragraphStyle_85a2c3"
|
|
137
|
+
>
|
|
138
|
+
<span
|
|
139
|
+
class="_boldText_85a2c3"
|
|
140
|
+
>
|
|
141
|
+
React:
|
|
142
|
+
</span>
|
|
143
|
+
A JavaScript library for building user interfaces.
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
<div
|
|
147
|
+
class="_infoSection_85a2c3"
|
|
148
|
+
>
|
|
149
|
+
<p
|
|
150
|
+
class="_paragraphStyle_85a2c3"
|
|
151
|
+
>
|
|
152
|
+
<span
|
|
153
|
+
class="_boldText_85a2c3"
|
|
154
|
+
>
|
|
155
|
+
TypeScript:
|
|
156
|
+
</span>
|
|
157
|
+
A superset of JavaScript that adds static typing.
|
|
158
|
+
</p>
|
|
159
|
+
</div>
|
|
160
|
+
<div
|
|
161
|
+
class="_infoSection_85a2c3"
|
|
162
|
+
>
|
|
163
|
+
<p
|
|
164
|
+
class="_paragraphStyle_85a2c3"
|
|
165
|
+
>
|
|
166
|
+
<span
|
|
167
|
+
class="_boldText_85a2c3"
|
|
168
|
+
>
|
|
169
|
+
React Query:
|
|
170
|
+
</span>
|
|
171
|
+
A library for managing, caching, and updating server state in React applications. (for more details check the
|
|
172
|
+
|
|
173
|
+
<span
|
|
174
|
+
class="_highlight_85a2c3"
|
|
175
|
+
>
|
|
176
|
+
README.md
|
|
177
|
+
</span>
|
|
178
|
+
file under the
|
|
179
|
+
|
|
180
|
+
<span
|
|
181
|
+
class="_boldText_85a2c3"
|
|
182
|
+
>
|
|
183
|
+
hooks
|
|
184
|
+
</span>
|
|
185
|
+
folder)
|
|
186
|
+
</p>
|
|
187
|
+
<div
|
|
188
|
+
class="_demoStyle_85a2c3"
|
|
189
|
+
>
|
|
190
|
+
<a
|
|
191
|
+
class="_a_85a2c3"
|
|
192
|
+
href="/reactQueryDemo"
|
|
193
|
+
>
|
|
194
|
+
Run Demo
|
|
195
|
+
</a>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
<div
|
|
199
|
+
class="_infoSection_85a2c3"
|
|
200
|
+
>
|
|
201
|
+
<p
|
|
202
|
+
class="_paragraphStyle_85a2c3"
|
|
203
|
+
>
|
|
204
|
+
<span
|
|
205
|
+
class="_boldText_85a2c3"
|
|
206
|
+
>
|
|
207
|
+
React Hook Form:
|
|
208
|
+
</span>
|
|
209
|
+
A library for managing forms with React hooks. (for more details check the
|
|
210
|
+
<span
|
|
211
|
+
class="_highlight_85a2c3"
|
|
212
|
+
>
|
|
213
|
+
README.md
|
|
214
|
+
</span>
|
|
215
|
+
file under the
|
|
216
|
+
|
|
217
|
+
<span
|
|
218
|
+
class="_boldText_85a2c3"
|
|
219
|
+
>
|
|
220
|
+
forms
|
|
221
|
+
</span>
|
|
222
|
+
folder)
|
|
223
|
+
</p>
|
|
224
|
+
<div
|
|
225
|
+
class="_demoStyle_85a2c3"
|
|
226
|
+
>
|
|
227
|
+
<a
|
|
228
|
+
class="_a_85a2c3"
|
|
229
|
+
href="/reactHookFormDemo"
|
|
230
|
+
>
|
|
231
|
+
Run Demo
|
|
232
|
+
</a>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
<div
|
|
236
|
+
class="_infoSection_85a2c3"
|
|
237
|
+
>
|
|
238
|
+
<p
|
|
239
|
+
class="_paragraphStyle_85a2c3"
|
|
240
|
+
>
|
|
241
|
+
<span
|
|
242
|
+
class="_boldText_85a2c3"
|
|
243
|
+
>
|
|
244
|
+
React Router:
|
|
245
|
+
</span>
|
|
246
|
+
A declarative routing solution for React. (for more details check the
|
|
247
|
+
<span
|
|
248
|
+
class="_highlight_85a2c3"
|
|
249
|
+
>
|
|
250
|
+
README.md
|
|
251
|
+
</span>
|
|
252
|
+
file under the
|
|
253
|
+
|
|
254
|
+
<span
|
|
255
|
+
class="_boldText_85a2c3"
|
|
256
|
+
>
|
|
257
|
+
routing
|
|
258
|
+
</span>
|
|
259
|
+
folder)
|
|
260
|
+
</p>
|
|
261
|
+
</div>
|
|
262
|
+
<div
|
|
263
|
+
class="_infoSection_85a2c3"
|
|
264
|
+
>
|
|
265
|
+
<p
|
|
266
|
+
class="_paragraphStyle_85a2c3"
|
|
267
|
+
>
|
|
268
|
+
<span
|
|
269
|
+
class="_boldText_85a2c3"
|
|
270
|
+
>
|
|
271
|
+
...and more:
|
|
272
|
+
</span>
|
|
273
|
+
Explore the
|
|
274
|
+
|
|
275
|
+
<span
|
|
276
|
+
class="_highlight_85a2c3"
|
|
277
|
+
>
|
|
278
|
+
Package.json
|
|
279
|
+
</span>
|
|
280
|
+
file to see additional dependencies.
|
|
281
|
+
</p>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
<div
|
|
285
|
+
class="_paragraphContainer_85a2c3"
|
|
286
|
+
>
|
|
287
|
+
<h1
|
|
288
|
+
class="_titleStyle_85a2c3"
|
|
289
|
+
>
|
|
290
|
+
Project Structure
|
|
291
|
+
</h1>
|
|
292
|
+
<div
|
|
293
|
+
class="_infoSection_85a2c3"
|
|
294
|
+
>
|
|
295
|
+
<div
|
|
296
|
+
class="_tableWrapper_85a2c3"
|
|
297
|
+
>
|
|
298
|
+
<table>
|
|
299
|
+
<thead>
|
|
300
|
+
<tr>
|
|
301
|
+
<th>
|
|
302
|
+
Folder
|
|
303
|
+
</th>
|
|
304
|
+
<th>
|
|
305
|
+
Description
|
|
306
|
+
</th>
|
|
307
|
+
</tr>
|
|
308
|
+
</thead>
|
|
309
|
+
<tbody>
|
|
310
|
+
<tr>
|
|
311
|
+
<td>
|
|
312
|
+
<span
|
|
313
|
+
class="_boldText_85a2c3"
|
|
314
|
+
>
|
|
315
|
+
api
|
|
316
|
+
</span>
|
|
317
|
+
</td>
|
|
318
|
+
<td>
|
|
319
|
+
Place your API-related code here.
|
|
320
|
+
</td>
|
|
321
|
+
</tr>
|
|
322
|
+
<tr>
|
|
323
|
+
<td>
|
|
324
|
+
<span
|
|
325
|
+
class="_boldText_85a2c3"
|
|
326
|
+
>
|
|
327
|
+
assets
|
|
328
|
+
</span>
|
|
329
|
+
</td>
|
|
330
|
+
<td>
|
|
331
|
+
Store your static assets (images, fonts, etc.) in this directory.
|
|
332
|
+
</td>
|
|
333
|
+
</tr>
|
|
334
|
+
<tr>
|
|
335
|
+
<td>
|
|
336
|
+
<span
|
|
337
|
+
class="_boldText_85a2c3"
|
|
338
|
+
>
|
|
339
|
+
components
|
|
340
|
+
</span>
|
|
341
|
+
</td>
|
|
342
|
+
<td>
|
|
343
|
+
Reusable React components go here.
|
|
344
|
+
</td>
|
|
345
|
+
</tr>
|
|
346
|
+
<tr>
|
|
347
|
+
<td>
|
|
348
|
+
<span
|
|
349
|
+
class="_boldText_85a2c3"
|
|
350
|
+
>
|
|
351
|
+
config
|
|
352
|
+
</span>
|
|
353
|
+
</td>
|
|
354
|
+
<td>
|
|
355
|
+
Configuration files and environment variables are managed here.
|
|
356
|
+
</td>
|
|
357
|
+
</tr>
|
|
358
|
+
<tr>
|
|
359
|
+
<td>
|
|
360
|
+
<span
|
|
361
|
+
class="_boldText_85a2c3"
|
|
362
|
+
>
|
|
363
|
+
forms
|
|
364
|
+
</span>
|
|
365
|
+
</td>
|
|
366
|
+
<td>
|
|
367
|
+
Define your forms using React Hook Form.
|
|
368
|
+
</td>
|
|
369
|
+
</tr>
|
|
370
|
+
<tr>
|
|
371
|
+
<td>
|
|
372
|
+
<span
|
|
373
|
+
class="_boldText_85a2c3"
|
|
374
|
+
>
|
|
375
|
+
hooks
|
|
376
|
+
</span>
|
|
377
|
+
</td>
|
|
378
|
+
<td>
|
|
379
|
+
Custom React hooks to share logic across components.
|
|
380
|
+
</td>
|
|
381
|
+
</tr>
|
|
382
|
+
<tr>
|
|
383
|
+
<td>
|
|
384
|
+
<span
|
|
385
|
+
class="_boldText_85a2c3"
|
|
386
|
+
>
|
|
387
|
+
pages
|
|
388
|
+
</span>
|
|
389
|
+
</td>
|
|
390
|
+
<td>
|
|
391
|
+
React components that represent individual pages or views.
|
|
392
|
+
</td>
|
|
393
|
+
</tr>
|
|
394
|
+
<tr>
|
|
395
|
+
<td>
|
|
396
|
+
<span
|
|
397
|
+
class="_boldText_85a2c3"
|
|
398
|
+
>
|
|
399
|
+
providers
|
|
400
|
+
</span>
|
|
401
|
+
</td>
|
|
402
|
+
<td>
|
|
403
|
+
React context providers for state management.
|
|
404
|
+
</td>
|
|
405
|
+
</tr>
|
|
406
|
+
<tr>
|
|
407
|
+
<td>
|
|
408
|
+
<span
|
|
409
|
+
class="_boldText_85a2c3"
|
|
410
|
+
>
|
|
411
|
+
routing
|
|
412
|
+
</span>
|
|
413
|
+
</td>
|
|
414
|
+
<td>
|
|
415
|
+
Configure your application routes here.
|
|
416
|
+
</td>
|
|
417
|
+
</tr>
|
|
418
|
+
<tr>
|
|
419
|
+
<td>
|
|
420
|
+
<span
|
|
421
|
+
class="_boldText_85a2c3"
|
|
422
|
+
>
|
|
423
|
+
types
|
|
424
|
+
</span>
|
|
425
|
+
</td>
|
|
426
|
+
<td>
|
|
427
|
+
TypeScript type definitions.
|
|
428
|
+
</td>
|
|
429
|
+
</tr>
|
|
430
|
+
<tr>
|
|
431
|
+
<td>
|
|
432
|
+
<span
|
|
433
|
+
class="_boldText_85a2c3"
|
|
434
|
+
>
|
|
435
|
+
ui
|
|
436
|
+
</span>
|
|
437
|
+
</td>
|
|
438
|
+
<td>
|
|
439
|
+
Presentational components and styles.
|
|
440
|
+
</td>
|
|
441
|
+
</tr>
|
|
442
|
+
<tr>
|
|
443
|
+
<td>
|
|
444
|
+
<span
|
|
445
|
+
class="_boldText_85a2c3"
|
|
446
|
+
>
|
|
447
|
+
utils
|
|
448
|
+
</span>
|
|
449
|
+
</td>
|
|
450
|
+
<td>
|
|
451
|
+
General utility functions.
|
|
452
|
+
</td>
|
|
453
|
+
</tr>
|
|
454
|
+
</tbody>
|
|
455
|
+
</table>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
<div
|
|
460
|
+
class="_paragraphContainer_85a2c3"
|
|
461
|
+
>
|
|
462
|
+
<h1
|
|
463
|
+
class="_titleStyle_85a2c3"
|
|
464
|
+
>
|
|
465
|
+
Additional Information
|
|
466
|
+
</h1>
|
|
467
|
+
<div
|
|
468
|
+
class="_infoSection_85a2c3"
|
|
469
|
+
>
|
|
470
|
+
<ul>
|
|
471
|
+
<li>
|
|
472
|
+
- Customize the project configuration in the
|
|
473
|
+
<code>
|
|
474
|
+
config
|
|
475
|
+
</code>
|
|
476
|
+
directory.
|
|
477
|
+
</li>
|
|
478
|
+
<li>
|
|
479
|
+
- Explore the
|
|
480
|
+
<code>
|
|
481
|
+
utils
|
|
482
|
+
</code>
|
|
483
|
+
directory for utility functions.
|
|
484
|
+
</li>
|
|
485
|
+
<li>
|
|
486
|
+
- Leverage React Query for efficient data fetching.
|
|
487
|
+
</li>
|
|
488
|
+
<li>
|
|
489
|
+
- Take advantage of React Hook Form for managing forms seamlessly.
|
|
490
|
+
</li>
|
|
491
|
+
<li>
|
|
492
|
+
- Refer to the
|
|
493
|
+
<code>
|
|
494
|
+
types
|
|
495
|
+
</code>
|
|
496
|
+
directory for TypeScript type definitions.
|
|
497
|
+
</li>
|
|
498
|
+
</ul>
|
|
499
|
+
</div>
|
|
500
|
+
<div
|
|
501
|
+
class="_infoSection_85a2c3"
|
|
502
|
+
>
|
|
503
|
+
<span
|
|
504
|
+
class="_centredText_85a2c3"
|
|
505
|
+
>
|
|
506
|
+
<p
|
|
507
|
+
class="_paragraphStyle_85a2c3"
|
|
508
|
+
>
|
|
509
|
+
Our project is organized into various folders, each containing its own
|
|
510
|
+
|
|
511
|
+
<span
|
|
512
|
+
class="_highlight_85a2c3"
|
|
513
|
+
>
|
|
514
|
+
README.md
|
|
515
|
+
</span>
|
|
516
|
+
file with specific details, instructions, and additional information. This documentation will guide you through setting up the environment, understanding the project structure, and using the available components and features. For more details, check the
|
|
517
|
+
<span
|
|
518
|
+
class="_highlight_85a2c3"
|
|
519
|
+
>
|
|
520
|
+
README.md
|
|
521
|
+
</span>
|
|
522
|
+
file in
|
|
523
|
+
|
|
524
|
+
<span
|
|
525
|
+
class="_boldText_85a2c3"
|
|
526
|
+
>
|
|
527
|
+
each folder of the project
|
|
528
|
+
</span>
|
|
529
|
+
.
|
|
530
|
+
</p>
|
|
531
|
+
</span>
|
|
532
|
+
</div>
|
|
533
|
+
<div
|
|
534
|
+
class="_infoSection_85a2c3"
|
|
535
|
+
>
|
|
536
|
+
<span
|
|
537
|
+
class="_centredText_85a2c3"
|
|
538
|
+
>
|
|
539
|
+
<p
|
|
540
|
+
class="_paragraphStyle_85a2c3"
|
|
541
|
+
>
|
|
542
|
+
Feel free to explore and modify the structure to suit your project's needs.
|
|
543
|
+
|
|
544
|
+
<span
|
|
545
|
+
class="_boldText_85a2c3"
|
|
546
|
+
>
|
|
547
|
+
Happy coding!
|
|
548
|
+
</span>
|
|
549
|
+
</p>
|
|
550
|
+
</span>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
</div>
|
|
555
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { demoRoutes } from './routes';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { reactHookFormDemoRoutes } from '@Front/pages/Demo/ReactHookFormDemo';
|
|
2
|
+
import { RouteObject } from 'react-router-dom';
|
|
3
|
+
import { Demo } from './Demo';
|
|
4
|
+
import { reactQueryDemoRoutes } from './ReactQueryDemo';
|
|
5
|
+
|
|
6
|
+
export const demoRoutes: RouteObject = {
|
|
7
|
+
children: [{ index: true, element: <Demo /> }, reactQueryDemoRoutes, reactHookFormDemoRoutes],
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import logo from '@Front/assets/images/logo.png';
|
|
2
|
+
import { Logo } from '@Front/ui/atoms/Logo';
|
|
3
|
+
import { Link, useRouteError } from 'react-router-dom';
|
|
4
|
+
|
|
5
|
+
import classes from './Error.module.css';
|
|
6
|
+
|
|
7
|
+
export const Error = () => {
|
|
8
|
+
const error: unknown = useRouteError();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className={classes.errorPageStyle}>
|
|
12
|
+
<Link to="/">
|
|
13
|
+
<Logo src={logo} alt="logo" />
|
|
14
|
+
</Link>
|
|
15
|
+
<h1>Oops!</h1>
|
|
16
|
+
<p>Sorry, an unexpected error has occurred.</p>
|
|
17
|
+
<p>
|
|
18
|
+
<i>{(error as Error)?.message || (error as { statusText?: string })?.statusText}</i>
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Error } from './Error';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Footer } from '@Front/components/Footer';
|
|
2
|
+
import { Header } from '@Front/components/Header';
|
|
3
|
+
import { MainTemplate } from '@Front/ui/templates/MainTemplate';
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
5
|
+
|
|
6
|
+
export const Layout = () => {
|
|
7
|
+
return (
|
|
8
|
+
<MainTemplate headerProps={{ leftComponents: <Header /> }} footerProps={{ footerContent: <Footer /> }}>
|
|
9
|
+
<Outlet />
|
|
10
|
+
</MainTemplate>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Layout } from './Layout';
|