fix: use-memo dependency array and prop-types error
This commit is contained in:
1 parent
2bb7818116
commit
fe44bc989a
3 files changed
+4
-3
No files matched your search
@@ -288,7 +288,7 @@ Search.propTypes = {
|
|||||||
options: PropTypes.array.isRequired,
|
options: PropTypes.array.isRequired,
|
||||||
filteredBy: PropTypes.string.isRequired,
|
filteredBy: PropTypes.string.isRequired,
|
||||||
secondaryLabel: PropTypes.string,
|
secondaryLabel: PropTypes.string,
|
||||||
value: PropTypes.array,
|
value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
|
||||||
inputValue: PropTypes.string.isRequired,
|
inputValue: PropTypes.string.isRequired,
|
||||||
handleInputChange: PropTypes.func.isRequired,
|
handleInputChange: PropTypes.func.isRequired,
|
||||||
handleChange: PropTypes.func,
|
handleChange: PropTypes.func,
|
||||||
@@ -299,6 +299,7 @@ Search.propTypes = {
|
|||||||
startAdornment: PropTypes.object,
|
startAdornment: PropTypes.object,
|
||||||
endAdornment: PropTypes.object,
|
endAdornment: PropTypes.object,
|
||||||
onBlur: PropTypes.func,
|
onBlur: PropTypes.func,
|
||||||
|
unit: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Search;
|
export default Search;
|
||||||
@@ -17,7 +17,7 @@ const SettingsTimeZone = ({ HEADING_SX, handleChange, timezone }) => {
|
|||||||
|
|
||||||
const selectedTimezone = useMemo(
|
const selectedTimezone = useMemo(
|
||||||
() => timezones.find((tz) => tz._id === timezone) ?? null,
|
() => timezones.find((tz) => tz._id === timezone) ?? null,
|
||||||
[timezone, timezones]
|
[timezone]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleTimezoneChange = useCallback(
|
const handleTimezoneChange = useCallback(
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const TabSettings = ({
|
|||||||
|
|
||||||
const selectedTimezone = useMemo(
|
const selectedTimezone = useMemo(
|
||||||
() => timezones.find((tz) => tz._id === form.timezone) ?? null,
|
() => timezones.find((tz) => tz._id === form.timezone) ?? null,
|
||||||
[form.timezone, timezones]
|
[form.timezone]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleTimezoneChange = useCallback(
|
const handleTimezoneChange = useCallback(
|
||||||
|
|||||||
Reference in new issue
Block a user