Skip to content

fix: toast positioning on narrow viewports, consistent timezone display, claim button state - #86

Open
Thecesar85 wants to merge 1 commit into
Steller-StellarPulse-org:mainfrom
Thecesar85:main
Open

fix: toast positioning on narrow viewports, consistent timezone display, claim button state#86
Thecesar85 wants to merge 1 commit into
Steller-StellarPulse-org:mainfrom
Thecesar85:main

Conversation

@Thecesar85

Copy link
Copy Markdown

Summary

Fixes 3 issues from the wave milestone:

#14 — Fix toast positioning on narrow viewports

  • Adjusted toast container's mobile bottom spacing to use env(safe-area-inset-bottom,0.75rem) fallback
  • Reduced horizontal padding so toasts never overflow on the narrowest viewports

#80 — Fix inconsistent timezone display in leaderboard

  • helpers.ts cleaned up: removed duplicate function definitions (toTimestampMs, formatDate, formatTime, timeAgo, formatEventTime, explorerUrl were all exported twice, with dead code after unreachable return)
  • Unified all timestamp helpers through a single toTimestampMs() with NaN/range guards
  • Intl.DateTimeFormat with timeZoneName ensures timestamps display in the viewer's local timezone

#21 — Fix claim button state during pending transactions

  • Button: added loading prop (spinner + disabled + opacity)
  • MarketDetailPage: claim button shows spinner and "Claiming..." text, blocking double-claims

Files changed

  • frontend/src/utils/helpers.ts — deduplication + timezone
  • frontend/src/hooks/useToast.tsx — mobile toast
  • frontend/src/components/ui/Button.tsx — loading prop
  • frontend/src/app/markets/[id]/page.tsx — claim button state

…ay, claim button state

- useToast: adjust toast container bottom margin and safe-area inset for mobile,
  use more conservative padding (left-2 right-2) so toasts never overflow on
  narrow viewports (Fixes Steller-StellarPulse-org#14)
- helpers: deduplicate timestamp functions (toTimestampMs, formatDate,
  formatTime, timeAgo, formatEventTime, explorerUrl), consolidate NaN/range
  guards, remove orphaned code and duplicate exports — all timestamps now
  display in the viewer's local timezone consistently (Fixes Steller-StellarPulse-org#80)
- Button: add loading prop with spinner icon and disable state
- MarketDetailPage: claim button now shows 'Claiming...' text + spinner while
  transaction is pending, disabling double-claims (Fixes Steller-StellarPulse-org#21)
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.

1 participant