Skip to content

Commit

Permalink
🐛 fix some code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriAlves5 committed Oct 25, 2023
1 parent 5f67b5d commit e0c7837
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
'import',
],
rules: {
"react/prop-types": "off"
},
};

31 changes: 20 additions & 11 deletions src/components/Input.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import React from "react";
import "../style/components/input.css"
import React from 'react';
import PropTypes from 'prop-types';
import '../style/components/input.css';

export default function Input(props) {
return (
<div className="Input">
<label>
{props.label}
</label>
<input placeholder={props.placeholder} className={props.className} onChange={props.onChange}/>
</div>
);
function Input(props) {
return (
<div className="Input">
<label>
{props?.label}
</label>
<input placeholder={props?.placeholder} className={props?.className} onChange={props?.onChange} />
</div>
);
}

Input.propTypes = {
label: PropTypes.string,
placeholder: PropTypes.string,
className: PropTypes.string,
onChange: PropTypes.func,
};

export default Input;
4 changes: 1 addition & 3 deletions src/pages/ChangePassword.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";
import React,{ useState } from "react";
import '../style/pages/changePassword.css';
import ChangePasswordPeople from '../assets/change-password-people.svg';
import elipse6 from '../assets/elipse6.svg';

import { useState } from 'react';
import { changePassword } from "../api/api";

export default function ChangePassword() {
Expand Down
1 change: 0 additions & 1 deletion src/pages/QuemSomos.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import '../style/pages/quemSomos.css';
//import pessoasDois from '../assets/pessoasDois.svg';
import PoliciaCivilLogo from '../assets/PoliciaCivilLogo.svg';
import elipse from '../assets/home_elipse.svg';

Expand Down

0 comments on commit e0c7837

Please sign in to comment.