fix: use-memo dependency array and prop-types error

This commit is contained in:
Yashaswee Kesharwani
2025-07-16 00:59:22 +05:30
parent 2bb7818116
commit fe44bc989a
3 changed files with 4 additions and 3 deletions

View File

@@ -288,7 +288,7 @@ Search.propTypes = {
options: PropTypes.array.isRequired,
filteredBy: PropTypes.string.isRequired,
secondaryLabel: PropTypes.string,
value: PropTypes.array,
value: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
inputValue: PropTypes.string.isRequired,
handleInputChange: PropTypes.func.isRequired,
handleChange: PropTypes.func,
@@ -299,6 +299,7 @@ Search.propTypes = {
startAdornment: PropTypes.object,
endAdornment: PropTypes.object,
onBlur: PropTypes.func,
unit: PropTypes.string,
};
export default Search;

View File

@@ -17,7 +17,7 @@ const SettingsTimeZone = ({ HEADING_SX, handleChange, timezone }) => {
const selectedTimezone = useMemo(
() => timezones.find((tz) => tz._id === timezone) ?? null,
[timezone, timezones]
[timezone]
);
const handleTimezoneChange = useCallback(

View File

@@ -33,7 +33,7 @@ const TabSettings = ({
const selectedTimezone = useMemo(
() => timezones.find((tz) => tz._id === form.timezone) ?? null,
[form.timezone, timezones]
[form.timezone]
);
const handleTimezoneChange = useCallback(