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

feat: Follow Service #11

Merged
merged 19 commits into from
Dec 17, 2023
Merged

feat: Follow Service #11

merged 19 commits into from
Dec 17, 2023

Conversation

Zaid-maker
Copy link
Owner

@Zaid-maker Zaid-maker commented Dec 17, 2023


Generated summary (powered by Graphite)

TL;DR

This pull request includes several changes to different files. It adds functionality for following and unfollowing users, updates React components to handle follow and unfollow actions, imports a new library for displaying toast messages, creates new functions for checking if a user is being followed and following a user, and modifies the database schema to include fields for user relationships.

What changed

  • Added functions for following and unfollowing users
  • Updated React components to handle follow and unfollow actions
  • Imported a new library for displaying toast messages
  • Created new functions for checking if a user is being followed and following a user
  • Modified the database schema to include fields for user relationships

How to test

  1. Run the application and navigate to the UserPage component
  2. Verify that the Actions component is rendered with the correct props
  3. Click the "Follow" or "Unfollow" button and observe the transition state
  4. Check if the API call is successful and the appropriate toast message is displayed
  5. Verify that the button is disabled while the transition is pending
  6. Test the new functions for checking if a user is being followed and following a user
  7. Verify that the database schema has been updated with the new fields for user relationships

Why make this change

  • The code adds functionality for following and unfollowing users, which enhances the user experience and allows users to connect with each other.
  • The React component updates improve the user interface and provide visual feedback for follow and unfollow actions.
  • The addition of the toast message library enhances the user experience by displaying success or error messages for follow and unfollow actions.
  • The new functions for checking if a user is being followed and following a user provide important functionality for managing user relationships.
  • The modifications to the database schema allow for more efficient querying and management of user relationships.

Copy link

semanticdiff-com bot commented Dec 17, 2023

Review changes with SemanticDiff.

Analyzed 9 of 10 files.

Overall, the semantic diff is 3% smaller than the GitHub diff.

Filename Status
✔️ actions/follow.ts Analyzed
✔️ app/(browse)/[username]/_components/actions.tsx Analyzed
✔️ app/(browse)/[username]/page.tsx Analyzed
✔️ app/layout.tsx Analyzed
✔️ lib/follow-service.ts Analyzed
✔️ lib/recommended-service.ts 24.81% smaller
✔️ lib/user-service.ts Analyzed
✔️ package-lock.json Analyzed
✔️ package.json Analyzed
prisma/schema.prisma Unsupported file format

Copy link

vercel bot commented Dec 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gamehub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2023 7:58pm

Copy link

gitstream-cm bot commented Dec 17, 2023

🥷 Code experts: no user but you matched threshold 10

Zaid-maker has most 👩‍💻 activity in the files.
Zaid-maker has most 🧠 knowledge in the files.

See details

app/layout.tsx

Activity based on git-commit:

Zaid-maker
DEC 50 additions & 15 deletions
NOV
OCT
SEP
AUG
JUL

Knowledge based on git-blame:
Zaid-maker: 100%

lib/recommended-service.ts

Activity based on git-commit:

Zaid-maker
DEC 11 additions & 0 deletions
NOV
OCT
SEP
AUG
JUL

Knowledge based on git-blame:
Zaid-maker: 100%

package-lock.json

Activity based on git-commit:

Zaid-maker
DEC 5782 additions & 115 deletions
NOV
OCT
SEP
AUG
JUL

Knowledge based on git-blame:
Zaid-maker: 100%

package.json

Activity based on git-commit:

Zaid-maker
DEC 49 additions & 5 deletions
NOV
OCT
SEP
AUG
JUL

Knowledge based on git-blame:
Zaid-maker: 100%

prisma/schema.prisma

Activity based on git-commit:

Zaid-maker
DEC 29 additions & 0 deletions
NOV
OCT
SEP
AUG
JUL

Knowledge based on git-blame:
Zaid-maker: 100%

To learn more about /:\ gitStream - Visit our Docs

@Zaid-maker Zaid-maker merged commit cbae191 into main Dec 17, 2023
9 checks passed
@Zaid-maker Zaid-maker deleted the follow-service branch December 17, 2023 20:09
@Zaid-maker
Copy link
Owner Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant