feat: add missing propTypes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
import { getItem, removeItem, setItem } from 'helpers/storage';
|
||||
import api from 'helpers/api.js';
|
||||
@@ -36,3 +37,7 @@ export const AuthenticationProvider = (props) => {
|
||||
</AuthenticationContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
AuthenticationProvider.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
@@ -1,10 +1,18 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export const EditorContext = React.createContext({
|
||||
readOnly: false,
|
||||
});
|
||||
|
||||
export const EditorProvider = (props) => {
|
||||
const { children, value } = props;
|
||||
return (
|
||||
<EditorContext.Provider value={value}>{children}</EditorContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
EditorProvider.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
value: PropTypes.shape({ readOnly: PropTypes.bool.isRequired }).isRequired,
|
||||
};
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -100,3 +101,7 @@ export const PaddleProvider = (props) => {
|
||||
<PaddleContext.Provider value={value}>{children}</PaddleContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
PaddleProvider.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { StepPropType } from 'propTypes/propTypes';
|
||||
|
||||
export const StepExecutionsContext = React.createContext([]);
|
||||
|
||||
export const StepExecutionsProvider = (props) => {
|
||||
const { children, value } = props;
|
||||
return (
|
||||
@@ -8,3 +12,8 @@ export const StepExecutionsProvider = (props) => {
|
||||
</StepExecutionsContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
StepExecutionsProvider.propTypes = {
|
||||
children: PropTypes.node.isRequired,
|
||||
value: PropTypes.arrayOf(StepPropType),
|
||||
};
|
||||
|
Reference in New Issue
Block a user