Skip to content

Fix/creator dashboard notifications twitter share - #819

Merged
Chucks1093 merged 6 commits into
accesslayerorg:devfrom
Alaka-ibr:fix/creator-dashboard-notifications-twitter-share
Aug 29, 2026
Merged

Fix/creator dashboard notifications twitter share#819
Chucks1093 merged 6 commits into
accesslayerorg:devfrom
Alaka-ibr:fix/creator-dashboard-notifications-twitter-share

Conversation

@Alaka-ibr

Copy link
Copy Markdown
Contributor

Description

Closes #811
Closes #800
Closes #797
Closes #812

Fixed Issues


Key Changes Made

1. Co-Creator Revenue Split Display & Config (#811)

  • Extended Course interface in course.service.ts with coCreatorAddress, coCreatorSplitBps, totalPaidToCoCreator, and totalPaidToCreator.
  • Added setCoCreator method in courseService (POST /courses/:id/co-creator) and useSetCoCreator mutation hook in useCreators.ts.
  • Created coCreator.utils.ts for validating Stellar G-addresses (/^G[A-Z2-7]{55}$/) and basis point range (1–10000).
  • Created SetCoCreatorModal.tsx dialog form with input validation and success toast notification upon save.
  • Created CoCreatorSection.tsx displaying truncated address with copy button, split percentage, total paid stat cards, and 'No co-creator configured' empty state.
  • Integrated CoCreatorSection into CreatorDetailPage.tsx.

2. Global Notification Drawer & Polling (#800)

  • Added support for 'trade_completed', 'lockup_expiring', and 'price_moved' notification types and markAllAsRead endpoint in notification.service.ts.
  • Updated useNotifications.ts with 60-second polling (refetchInterval: 60000) and optimistic markAllAsRead.
  • Updated NotificationBell.tsx to render a slide-in drawer from the right side, newest-first notification order, distinct event icons for each event type, and automatic unread badge clearing on open.

3. Share to Twitter / X Button (#797)

  • Added shareTwitter.utils.ts to format tweet text (Just bought [CreatorName] keys on AccessLayer at [price] XLM. Buy here: [referral link]) and Twitter intent URL.
  • Created ShareTwitterButton.tsx which opens Twitter intent in a new tab, falls back to plain key URL if no referral link exists, and renders only for authenticated holders (quantity > 0).
  • Integrated ShareTwitterButton on CreatorDetailPage.tsx below creator stats cards.

Verification & Testing

Unit & Integration Tests Passed (36/36)

  • src/components/creator/__tests__/CoCreatorSection.test.tsx (6 tests)
  • src/components/common/__tests__/NotificationBell.test.tsx (15 tests)
  • src/hooks/__tests__/useNotifications.test.ts (6 tests)
  • src/components/common/__tests__/ShareTwitterButton.test.tsx (6 tests)
  • src/pages/__tests__/CreatorDetailPage.integration.test.tsx (3 tests)

Checklist

  • Code follows repository style guide and conventions
  • No linting or TypeScript errors (pnpm check passed)
  • All unit and integration tests pass cleanly
  • Tested manually in browser

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@Alaka-ibr 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

- Merge staking fields (stakingPoolBalance, totalStaked, recentFeeInflow,
  name, bio, avatarUri, auctionPrice, auctionSupply, auctionSold) and
  stakedQuantity on KeyHolderEntry from upstream/dev into course.service.ts
- Keep co-creator fields and setCoCreator() method from this branch
- Merge StakingRewardsSection from upstream/dev into CreatorDetailPage
- Keep ShareTwitterButton, CoCreatorSection, and improved 404 handling
  from this branch in CreatorDetailPage
@Chucks1093
Chucks1093 merged commit 8113c69 into accesslayerorg:dev Aug 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment