Skip to content

refactor: Use UserStore in ProfileCard component (closes #261)#357

Open
adamsithr wants to merge 1 commit into
StarShopCr:mainfrom
adamsithr:bounty/profile-card-userstore
Open

refactor: Use UserStore in ProfileCard component (closes #261)#357
adamsithr wants to merge 1 commit into
StarShopCr:mainfrom
adamsithr:bounty/profile-card-userstore

Conversation

@adamsithr

@adamsithr adamsithr commented Jun 25, 2026

Copy link
Copy Markdown

This PR resolves the issue by replacing hardcoded user details with dynamic store data from the userStore.

Changes

  • Imported useUser from @/shared/stores/userStore.
  • Replaced hardcoded name Matias Aguilar and hardcoded email xaguilar@gmail.com with reactive data from the hook: {name || 'User Name'} and {email || 'user@example.com'}.
  • Maintained styling, structure, and TypeScript types.

Closes #261.

Summary by CodeRabbit

  • Bug Fixes
    • Profile details now display the current user’s name and email instead of static placeholder values.
    • Added fallback text when profile information is missing, preventing blank fields in the card.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 07dc98ac-ba95-4f52-8b7f-940ccdb5fe04

📥 Commits

Reviewing files that changed from the base of the PR and between caf26b1 and c92ebc2.

📒 Files selected for processing (1)
  • src/features/buyer/profile/components/ProfileCard.tsx

📝 Walkthrough

Walkthrough

ProfileCard now reads the displayed name and email from useUser(), with fallback strings when those values are empty. The card layout and styling remain unchanged.

Changes

Buyer profile card data binding

Layer / File(s) Summary
Store-backed profile fields
src/features/buyer/profile/components/ProfileCard.tsx
ProfileCard imports useUser(), reads name and email, and renders fallback strings instead of hard-coded profile text.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

I hopped by the profile card, quick and spry,
Saw name and email pulled from the sky.
When fields are empty, defaults appear,
A tidy little update, bright and clear.
🐰✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is helpful, but it misses the repository's required template sections and checkbox checklist. Reformat the PR body to match the template and fill in the checkbox list, change type, evidence, time spent, and comments.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: switching ProfileCard to UserStore data for issue #261.
Linked Issues check ✅ Passed The PR matches #261 by using useUser, replacing hardcoded name/email, adding fallbacks, and preserving the component layout.
Out of Scope Changes check ✅ Passed No unrelated code changes are indicated; the scope stays focused on ProfileCard's user data source.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adamsithr

Copy link
Copy Markdown
Author

Hi there! 👋 Just gently following up on this PR. I've verified all the fixes and everything is passing on my end. I would greatly appreciate a review when you have a moment, as I am hoping to get this bounty closed out. Thank you!

@adamsithr

Copy link
Copy Markdown
Author

Hi there! 👋 Just a gentle ping on this PR. Let me know if there's any feedback or if anything else is needed from my end to get this reviewed so we can close out the bounty. Thanks!

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.

Use UserStore in ProfileCard Component

1 participant