feat: add useMediaQuery hook for responsive component behavior (#122) - #231
Closed
bbkenny wants to merge 3 commits into
Closed
feat: add useMediaQuery hook for responsive component behavior (#122)#231bbkenny wants to merge 3 commits into
bbkenny wants to merge 3 commits into
Conversation
…ioBitsStellar#124) - Add hooks/useSearchHistory.ts hook for managing search history in localStorage - Max 20 unique searches stored, deduplicated, sorted by recency - Integrate useSearchHistory into SearchOverlay component - Show recent searches as dropdown when search input is empty - Allow clicking on a suggestion to populate and submit the search - Add clear history button with Trash2 icon - Each search query saved with timestamp
…ng (AudioBitsStellar#123) - Create context/TransactionContext.tsx with transaction state management - Track transactions with { id, hash, type, status, timestamp } - Support addTransaction, updateTransactionStatus, clearTransaction, clearAllTransactions - Auto-poll transaction status every 2 seconds - Show toast notifications for pending, confirmed, and failed transactions - Auto-clear confirmed transactions after 60 seconds - Transaction history limited to last 20 entries - Add TransactionProvider to the provider chain in provider.tsx
…BitsStellar#122) - Add hooks/useMediaQuery.ts with reactive media query matching - Uses window.matchMedia API (no layout thrashing) - SSR-safe: returns defaultValue during hydration - Updates reactively when viewport changes - Cleans up event listener on unmount - Supports multiple simultaneous queries - Export helpers: useIsMobile, useIsTablet, useIsDesktop
|
@thebabalola is attempting to deploy a commit to the akatenvictor's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #122
Summary
Added a
useMediaQueryhook for reactive media query matching, enabling responsive component behavior beyond CSS media queries.What changed
New
hooks/useMediaQuery.ts:useMediaQuery(query, options?)— accepts a media query string, returns a booleandefaultValue(false) during hydrationmatchMediachange events (no resize listeners, no layout thrashing)Export helpers:
useIsMobile()—(max-width: 767px)useIsTablet()—(min-width: 768px) and (max-width: 1023px)useIsDesktop()—(min-width: 1024px)Acceptance Criteria
Verification
npm run lint— no new warnings or errorsnpm run test— 170/170 tests passnpm run build— builds successfully