Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
InnaAnatoliivna committed Aug 9, 2023
1 parent 0deac28 commit 7503db2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/components/add-contact/add-contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { useDispatch, useSelector } from 'react-redux';
import { selectorContacts } from 'redux/selectors';
import { addContact } from 'redux/reducers/contactsSlice';

const AddContactForm = () => {
const nameInputId = getRandomId();
const numerInputId = getRandomId();
const nameInputId = getRandomId();
const numerInputId = getRandomId();

const AddContactForm = () => {
const [name, setName] = useState('');
const [number, setNumber] = useState('');

Expand Down
16 changes: 5 additions & 11 deletions src/components/savedContact/savedContact.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import { IoMdContact } from 'react-icons/io';
import css from 'components/SavedContact/savedContact.module.css'
import css from 'components/SavedContact/savedContact.module.css';

const SavedContact = ({ id, name, number }) => {

return (
<li className={css.item} key={name}
>
<li className={css.item} key={name}>
<p className={css.itemText}>
<IoMdContact className={css.icon} />
{name}: {number}
</p>
<button
className={css.btn}
type='button'
data-id={id}
>
<button className={css.btn} type="button" data-id={id}>
Delete
</button>
</li>
)
}
);
};

export default SavedContact;

0 comments on commit 7503db2

Please sign in to comment.