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

Use enum for user redux actions instead of constant value strings #1107

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

barnettx
Copy link
Contributor

@barnettx barnettx commented Jan 3, 2021

Problem

Import bloat in src/client/user/actions/index.ts due to actions being stored as constant value strings in src/client/user/actions/types.ts

Closes #937

Solution

Replace constant value strings with UserAction String Enum as suggested in issue.

Tests

npm run build compiled successfully.

First time contributing to this repo, kindly let me if there are areas I can improve in.

@barnettx barnettx closed this Jan 4, 2021
@barnettx barnettx reopened this Jan 4, 2021
Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

Hi @barnettx ,

Thanks for contributing to the repository!

I've made a suggestion, but the code looks good otherwise. Happy to approve once the changes have been made.

Thanks!

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

thanks for your contribution!

@liangyuanruo liangyuanruo merged commit d65b6d2 into opengovsg:develop Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use enums for Redux actions
2 participants