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

[Refactor] Profile Page #3

Open
Anurag5086 opened this issue Sep 24, 2021 · 2 comments
Open

[Refactor] Profile Page #3

Anurag5086 opened this issue Sep 24, 2021 · 2 comments

Comments

@Anurag5086
Copy link
Member

Anurag5086 commented Sep 24, 2021

Refactoring the Profile Page

Here are few practices which we need to ensure while refactoring a file-

  1. Removing the inline CSS and adding them into a separate CSS file.
  2. Breaking the page into smaller components and reusing them when needed.
  3. Adding app the API calls into the actions directory.
  4. Making sure the code is modular enough.

Looking forward to your contribution :)

@VB-17
Copy link
Contributor

VB-17 commented Oct 3, 2021

Hey ! I have been working on refactoring the profile page and i have refactored it partially, also i have formatted all the files in the project using a prettier script npx prettier --write \"./**/*.{js,jsx,json,css}\" . I just wanted to know that even though you have an error state it is not being used anywhere in the component . So what should i do with that ? Also i have reduced the tab width in .prettierrc to 2 because long files with tab width as 4 were very difficult to navigate.

const [error, setError] = useState(true)

@Anurag5086
Copy link
Member Author

Anurag5086 commented Oct 4, 2021

@VB-17 Thank you for your interest in this issue.
I would suggest you to open a separate issue for the same.
Add the prettier script into the package.json file as a script and raise a PR for the same.

For now we can comment out the error state as we may need it in future.

Here are few practices which we need to ensure while refactoring a file-

  1. Removing the inline CSS and adding them into a separate CSS file.
  2. Breaking the page into smaller components and reusing them when needed.
  3. Adding all the API calls into the actions directory.
  4. Making sure the code is modular enough.

Looking forward to your contribution :)
In case you have any blockers, feel free to reach out.

@Anurag5086 Anurag5086 assigned VB-17 and unassigned VB-17 Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants