Skip to content

Issue 133 - #153

Merged
Chucks1093 merged 10 commits into
accesslayerorg:mainfrom
Johnpii1:issue-133
Apr 25, 2026
Merged

Issue 133#153
Chucks1093 merged 10 commits into
accesslayerorg:mainfrom
Johnpii1:issue-133

Conversation

@Johnpii1

Copy link
Copy Markdown
Contributor

Summary

Add src/utils/avatarColor.util.ts implementing a simple string hash and getFallbackAvatarColors(creatorId) which returns a gradient background and fixed high-contrast text color.
Update CreatorInitialsAvatar to accept an optional creatorId prop and apply the computed fallback gradient and text color when imageSrc is missing or fails to load (src/components/common/CreatorInitialsAvatar.tsx).
Wire creatorId into avatar usages in CreatorCard and CreatorProfileHeader, and update the LandingPage example to pass a creatorId so fallbacks are deterministic (src/components/common/CreatorCard.tsx, src/components/common/CreatorProfileHeader.tsx, src/pages/LandingPage.tsx).
Add unit tests to verify deterministic color generation and that the initials fallback renders with the expected background and text color (src/components/common/tests/CreatorInitialsAvatar.test.tsx).

Testing

Ran lint with pnpm lint and it passed after moving color logic to src/utils/avatarColor.util.ts (✅).
Ran the new unit tests with pnpm test src/components/common/tests/CreatorInitialsAvatar.test.tsx and both tests passed (✅).
pnpm build was attempted and failed due to an unrelated pre-existing TypeScript error in src/components/ui/dialog.test.tsx (unused React import), which is not part of this change (⚠️).

  • pnpm lint
  • pnpm build

Checklist

close #133

  • Linked issue or backlog item
  • Scope is limited to the stated change
  • Updated docs if behavior or setup changed
  • Added screenshots for UI changes when relevant

@drips-wave

drips-wave Bot commented Apr 25, 2026

Copy link
Copy Markdown

@Johnpii1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Johnpii1

Copy link
Copy Markdown
Contributor Author

merge boss

@Chucks1093
Chucks1093 merged commit 3ebdfca into accesslayerorg:main Apr 25, 2026
1 check passed
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.

Add fallback avatar color hashing by creator id

2 participants