Skip to content

Commit f85d53b

Browse files
authored
[Closes #4] Remove prop-types references, ran npm audit fix (#6)
1 parent 5a68902 commit f85d53b

7 files changed

Lines changed: 27 additions & 61 deletions

File tree

client/src/AuthContextProvider.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import { authContext, AuthContextValue } from './AuthContext';
2-
import PropTypes from 'prop-types';
32

43
function AuthContextProvider ({ children }) {
54
const value = AuthContextValue();
65
return <authContext.Provider value={value}>{children}</authContext.Provider>;
76
}
87

9-
AuthContextProvider.propTypes = {
10-
children: PropTypes.node,
11-
};
12-
138
export default AuthContextProvider;

client/src/Components/DropzoneUploader.jsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useEffect, useState } from 'react';
22
import { useDropzone } from 'react-dropzone-esm';
3-
import PropTypes from 'prop-types';
43
import { v4 as uuid } from 'uuid';
54

65
import Api from '../Api';
@@ -106,16 +105,4 @@ function DropzoneUploader ({ className, children, disabled, id, maxFiles, multip
106105
);
107106
}
108107

109-
DropzoneUploader.propTypes = {
110-
children: PropTypes.func,
111-
className: PropTypes.string,
112-
disabled: PropTypes.bool,
113-
id: PropTypes.string,
114-
maxFiles: PropTypes.number,
115-
multiple: PropTypes.bool,
116-
onRemoved: PropTypes.func,
117-
onUploaded: PropTypes.func,
118-
onUploading: PropTypes.func,
119-
};
120-
121108
export default DropzoneUploader;

client/src/Components/Pagination.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Group, Pagination as MPagination } from '@mantine/core';
2-
import PropTypes from 'prop-types';
32
import { Link } from 'react-router';
43

54
function Pagination ({ page, lastPage, otherParams = {} }) {
@@ -26,11 +25,4 @@ function Pagination ({ page, lastPage, otherParams = {} }) {
2625
);
2726
}
2827

29-
Pagination.propTypes = {
30-
lastPage: PropTypes.number,
31-
page: PropTypes.number,
32-
url: PropTypes.string,
33-
otherParams: PropTypes.object,
34-
};
35-
3628
export default Pagination;

client/src/Components/PhotoInput.jsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Box, CloseButton, Image, Input, Loader, Text } from '@mantine/core';
22
import classNames from 'classnames';
3-
import PropTypes from 'prop-types';
43

54
import DropzoneUploader from './DropzoneUploader';
65
import classes from './PhotoInput.module.css';
@@ -62,14 +61,4 @@ function PhotoInput ({ children, description, error, id, label, name, onChange,
6261
);
6362
}
6463

65-
PhotoInput.propTypes = {
66-
children: PropTypes.node,
67-
className: PropTypes.string,
68-
id: PropTypes.string,
69-
name: PropTypes.string,
70-
onChange: PropTypes.func,
71-
value: PropTypes.string,
72-
valueUrl: PropTypes.string,
73-
};
74-
7564
export default PhotoInput;

client/src/RegistrationForm.jsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Alert, Button, Fieldset, Group, Stack, TextInput } from '@mantine/core';
2-
import PropTypes from 'prop-types';
32

43
function RegistrationForm ({ onChange, onSubmitMutation, user }) {
54
function onSubmit (event) {
@@ -57,10 +56,4 @@ function RegistrationForm ({ onChange, onSubmitMutation, user }) {
5756
);
5857
}
5958

60-
RegistrationForm.propTypes = {
61-
onChange: PropTypes.func,
62-
onSubmitMutation: PropTypes.object,
63-
user: PropTypes.object,
64-
};
65-
6659
export default RegistrationForm;
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import PropTypes from 'prop-types';
2-
31
import { staticContext } from './StaticContext';
42

53
function StaticContextProvider ({ value, children }) {
64
return <staticContext.Provider value={value}>{children}</staticContext.Provider>;
75
}
86

9-
StaticContextProvider.propTypes = {
10-
children: PropTypes.node,
11-
value: PropTypes.object,
12-
};
13-
147
export default StaticContextProvider;

package-lock.json

Lines changed: 27 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)