Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore remove connect from contacts overview #667

Merged
merged 5 commits into from Mar 10, 2020

Conversation

jpoppe
Copy link
Contributor

@jpoppe jpoppe commented Mar 9, 2020

This PR contains changes that remove react-redux's connect function, making the users overview container a lot cleaner.

Test have been rewritten to cover the changes in the component.

(Text has been borrowed from Jan Jaap ;)

@@ -54,14 +52,15 @@ const StyledDataView = styled(DataView)`
}
`;

export const UsersOverviewContainer = ({ userCan }) => {
export const UsersOverviewContainer = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Named export should be removed

@@ -39,7 +37,7 @@ const StyledSearchbar = styled(SearchBar)`
}
`;

const filtersReducer = (state, action) => {
const filtersReducer = (_, action) => {
switch (action.type) {
case 'username':
return { username: action.payload };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return { ...state, username: action.payload };

@jpoppe jpoppe merged commit 22e84a8 into develop Mar 10, 2020
@janjaap janjaap mentioned this pull request Mar 18, 2020
@janjaap janjaap deleted the chore-remove-connect-from-contacts-overview branch March 25, 2020 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants