Skip to content

Commit

Permalink
Replace defaultProps usage with JavaScript default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
user890104 committed Jun 8, 2024
1 parent 5a8e90b commit 747d1ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/widgets/DeviceActionButton/DeviceActionButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const types = {
const DeviceActionButton = ({
deviceId,
action,
isDoorOpen,
isDoorOpen = false,
}) => {
const [ disabled, setDisabled ] = useState(false);

Expand Down Expand Up @@ -75,8 +75,4 @@ const DeviceActionButton = ({
</>);
};

DeviceActionButton.defaultProps = {
isDoorOpen: false,
};

export default DeviceActionButton;
6 changes: 1 addition & 5 deletions src/widgets/icons/LoadingIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ import PropTypes from 'prop-types';
import { Spinner } from 'react-bootstrap';

const LoadingIcon = ({
large,
large = false,
}) => {
return (
<Spinner size={large ? null : 'sm'} />
);
};

LoadingIcon.defaultProps = {
large: false,
};

LoadingIcon.propTypes = {
large: PropTypes.bool,
};
Expand Down

0 comments on commit 747d1ca

Please sign in to comment.