Skip to content

[Refactor] Profile Page #3

Open

Description

@Anurag5086

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

Activity

  1. VB-17 commented on Oct 3, 2021

    @VB-17
    Contributor

    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)
  2. Anurag5086 commented on Oct 4, 2021

    @Anurag5086
    MemberAuthor

    @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.

  3. assigned and unassigned on Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions