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 UI/unconfirmed transactions #34

Open
wants to merge 20 commits into
base: feat-ui/unconfirmed-transactions
Choose a base branch
from

Conversation

Maphikza
Copy link
Member

Relay Settings Refactoring and Enhancements

Changes

  • Refactored RelaySettingsPage into smaller, more manageable components:
    • Desktop and Mobile layouts
    • Individual section components (Network, App Buckets, Subscription, Kinds, Media)
    • Shared components (CollapsibleSection, SectionCard)
  • Made all sections collapsible by default for better navigation
  • Added free tier support to subscription management
  • Fixed state management and initialization for settings
  • Maintained all existing functionality while improving code organization

Component Structure

src/components/relay-settings/
├── layouts/
│ ├── DesktopLayout.tsx
│ └── MobileLayout.tsx
├── sections/
│ ├── NetworkSection/
│ ├── AppBucketsSection/
│ ├── SubscriptionSection/
│ ├── KindsSection/
│ └── MediaSection/
└── shared/
├── CollapsibleSection/
└── SectionCard/
Copy

New Features

  • Free tier option in subscription management
  • Collapsible sections for better UX
  • Improved state handling for subscription tiers
  • Better separation of concerns in component architecture

Testing

  • Verify all existing functionality works as before
  • Test subscription tier management with free tier
  • Test collapsible sections behavior
  • Test mobile and desktop layouts
  • Verify settings persist correctly after reload

Maphikza and others added 20 commits November 1, 2024 11:16
- Add SubscriptionTiersManager component for configuring relay subscription plans
- Integrate subscription tiers with existing relay settings interface
- Update Settings type to include subscription_tiers
- Add UI for adding, removing, and editing subscription tiers
- Match styling with existing dark theme components
- Handle price values as strings for backend compatibility
- Update useBitcoinRates hook to properly parse TimestampHornets field
- Fix data transformation to correctly display historical price data
- Resolve invalid date display issues in chart visualization

The hook now correctly converts backend timestamps to valid JavaScript dates,
ensuring proper chronological display of Bitcoin price data in the chart.
- Fixed subscription tiers mapping between frontend and backend
- Added proper interfaces for BackendSubscriptionTier with correct field names
- Updated transformFromBackendSettings and transformToBackendSettings to handle lowercase fields
- Added isFileStorageActive field mapping in settings transformations
- Add useTrendingCreators hook for fetching paid subscriber profiles
- Implement automatic fallback to dummy profiles when no paid subscribers exist
- Add proper authentication handling with token support
- Update TrendingCreators component to use new hook
- Fix profile image display by using imported assets
- Add error handling and loading states
- Add debug logging for troubleshooting

This change improves the trending creators section by showing dummy profiles
until paid subscribers are available, then seamlessly transitioning to real
subscriber profiles once they exist.
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.

2 participants