feat: modify TemplateCard and TemplateGrid to handle optional id and filter templates
refactor: clean up use-template-filter to use CategoryTemplate type
- Implemented TemplateGrid component for displaying templates in a grid layout.
- Added calculateCardWidth helper function for dynamic card sizing.
- Created TitleBar component for displaying the title and points with interaction.
- Added unit tests for TemplateGrid and TitleBar components to ensure proper functionality.
- Introduced useStickyTabs and useTabNavigation hooks with tests for managing sticky tab behavior and navigation logic.
- Implemented useTemplateFilter hook for filtering templates based on video content.
- Added comprehensive tests for all new hooks and components to validate behavior and edge cases.
SDK API only accepts single MessageType value, not array. Updated to use client-side filtering for Tab-based message type filtering (all/notice/other) instead of server-side filtering.
Changes:
- hooks/use-messages.ts: Changed type parameter from array to single value
- app/(tabs)/message.tsx: Replaced getMessageTypeByTab with filterMessagesByTab for client-side filtering
- Removed useEffect dependency on activeTab to prevent unnecessary refetches
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>