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: Move socket functions to buddySocket file #744

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yuvrajinbhakti
Copy link

@yuvrajinbhakti yuvrajinbhakti commented Feb 11, 2025

Fixes Issue

My PR closes #661

πŸ‘¨β€πŸ’» Changes proposed(What did you do ?)

βœ”οΈ Check List (Check all the applicable boxes)

  • Moved all socket-related functionality from BuddyMatcher component into a separate buddySocket.js file
  • Created a new custom hook useBuddySocket to encapsulate socket logic
  • Fixed JSX syntax issues by ensuring proper file extensions
  • Improved code organization and maintainability
  • Removed JSX content from .js files to prevent syntax errors

βœ”οΈ Check List

  • [βœ”οΈ] My code follows the code style of this project.
  • [βœ”οΈ] This PR does not contain plagiarized content.
  • [βœ”οΈ] The title and description of the PR is clear and explains the approach.

Note to reviewers

  • The main functional change is moving socket logic to a separate file
  • Special attention needed for the socket event cleanup in useEffect
  • Verified that all socket events are properly handled
  • Ensured no JSX syntax in .js files
  • No change in core functionality, this is purely a refactoring PR

Copy link

vercel bot commented Feb 11, 2025

@yuvrajinbhakti is attempting to deploy a commit to the dunsin's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

Copy link
Owner

@Dun-sin Dun-sin 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 the PR, can you share a recording of the working software? With you chatting

@@ -8,7 +8,7 @@ import NavBar from 'components/NavBar';
import NoPage from './pages/NoPage';
import Profile from './pages/Profile';
import ProtectedRoutes from 'components/ProtectedRoutes';
import ReactGA from 'react-ga4';
// import ReactGA from 'react-ga4';
Copy link
Owner

Choose a reason for hiding this comment

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

Please uncomment this

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.

[OTHER] move all socket function into a different file
2 participants