Frontend icon indicating copy to clipboard operation
Frontend copied to clipboard

[Refactor] Profile Page

Open Anurag5086 opened this issue 4 years ago • 2 comments

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 :)

Anurag5086 avatar Sep 24 '21 13:09 Anurag5086

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)

VB-17 avatar Oct 03 '21 22:10 VB-17

@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 avatar Oct 04 '21 06:10 Anurag5086