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] The code hover effect on TSC member cards doesn't need to use state. #3413

Open
2 tasks done
SahilDahekar opened this issue Nov 19, 2024 · 3 comments · May be fixed by #3414 or #3419
Open
2 tasks done

[REFACTOR] The code hover effect on TSC member cards doesn't need to use state. #3413

SahilDahekar opened this issue Nov 19, 2024 · 3 comments · May be fixed by #3414 or #3419

Comments

@SahilDahekar
Copy link

Why do we need this improvement?

  • Currently the code for Github , X , Linkedin Icon for the TSC member cards on /community/tsc page have been written in a way that uses the useState() hook and onMouseEnter() / onMouseLeave() .
  • This is unnecessary because hover: in tailwind does it by default.
  • This additional state changing overhead can be removed to optimize this piece of code .

How will this change help?

  • On /community/tsc page , only these icons are using useState() which is not required for hover.
  • Removing this can turn this into a server component and thus improving performance

Screenshots

  • Current code using useState() for hover.
    Screenshot from 2024-11-19 19-28-05

  • Refactored code that will still work fill without needing to use useState().
    image

How could it be implemented/designed?

The hover feature would just work fine as it used to if the state implementation is removed.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@Sachin-Mahato
Copy link

Could you please assign this task to me?

@devilkiller-ag
Copy link
Member

@SahilDahekar, I don't think this issue belongs in the feature category. It's a code refactoring issue.

Ref: https://github.com/asyncapi/website/blob/master/CONTRIBUTING.md

@SahilDahekar SahilDahekar changed the title [FEATURE] The code hover effect on TSC member cards doesn't need to use state. [REFACTOR] The code hover effect on TSC member cards doesn't need to use state. Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants