Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorSvertoka committed Mar 2, 2024
1 parent 320ea1c commit db186ea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/components/ContactForm/ContactForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const ContactForm = () => {
setNumber('');
};

const handleChange = ({ target: { name, value } }) => {
const handleChange = event => {
const { name, value } = event.target;

switch (name) {
case 'name':
setName(value);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Filter/Filter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { changeFilter } from '../../redux/filterSlice';

const filterInputId = nanoid();

function Filter() {
const Filter = () => {
const value = useSelector(selectFilter);
const dispatch = useDispatch();

Expand All @@ -31,6 +31,6 @@ function Filter() {
</label>
</div>
);
}
};

export default Filter;
1 change: 0 additions & 1 deletion src/redux/contactsSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ const contactsSlice = createSlice({
});

export const { addContact, deleteContact } = contactsSlice.actions;

export const contactsReducer = contactsSlice.reducer;
3 changes: 1 addition & 2 deletions src/redux/filterSlice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createSlice } from '@reduxjs/toolkit';

const filterSlice = createSlice({
export const filterSlice = createSlice({
name: 'filter',
initialState: '',
reducers: {
Expand All @@ -11,5 +11,4 @@ const filterSlice = createSlice({
});

export const { changeFilter } = filterSlice.actions;

export const filterReducer = filterSlice.reducer;
3 changes: 0 additions & 3 deletions src/redux/store.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { configureStore } from '@reduxjs/toolkit';
import {
persistStore,
FLUSH,
REHYDRATE,
PAUSE,
Expand All @@ -24,5 +23,3 @@ export const store = configureStore({
},
}),
});

export const persistor = persistStore(store);

0 comments on commit db186ea

Please sign in to comment.