PostCard
Displays an individual post with author information, content, engagement metrics, and action buttons. Supports likes, comments, views, and edit/delete actions for post owners.Props
The current user’s ID, used to determine if edit/delete actions should be shown
Post object containing all post data including:
$id: Post unique identifierauthorId: Post author’s user IDauthorName: Post author’s display namecontent: Post text contentlikes: Number of likeslikedBy: Array of user IDs who liked the postcommentCount: Number of commentsviews: Number of viewsimage: Optional image URL$createdAt: ISO timestamp of creation
Usage Example
Visual Description
- Header: Circular avatar with author’s initial, author name, and relative timestamp
- Actions (owner only): Edit and delete icons in top-right
- Content: Post text with proper line height
- Image: Optional aspect-video image placeholder
- Footer: Like, comment, and view counts with icons
- Interaction: Entire card is pressable and navigates to post detail
CommentCard
Displays a user comment with author information, timestamp, and edit/delete actions for comment owners.Props
Current user’s ID for determining ownership
Comment object with:
$id: Comment unique identifierauthorId: Comment author’s user IDcontent: Comment text$createdAt: ISO timestamp
Callback function invoked when edit button is pressed
Callback function invoked when delete button is pressed
Usage Example
Visual Description
- Avatar: Circular gray background with author’s first letter
- Header: Author name with edit/delete icons (if owner)
- Content: Comment text with proper spacing
- Footer: Formatted publication date in bottom-right
- Border: Gray bottom border separating comments
MatchRoomCard
Displays a match room with team information, status badge, and join/view button. Automatically calculates status based on start/end times.Props
Room object containing:
$id: Room unique identifierteams: Array of two team namesstartTime: ISO timestamp of match startendTime: ISO timestamp of match end (optional)status: Current status (“live” | “upcoming” | “finished”)matchType: “ODI” | “TEST” | “T20”isLocked: Boolean indicating if chat is locked
Usage Example
Visual Description
- Team Logos: Two circular badges with team abbreviations (first 3 letters)
- Teams Display: “Team A vs Team B” centered text
- Status Badge: Color-coded pill (green=live, yellow=upcoming, red=finished)
- CTA Button: Orange “Join Room” or “View Room” button based on status
- Card Style: White background with shadow and active scale animation
CreatePostModal
Full-screen modal for creating new posts with content input and character counter.Props
Controls modal visibility
Callback function to close the modal
Usage Example
Features
- Header: Close icon (left), “Create Post” submit button (right)
- Content Input: Multi-line text input with 512 character limit
- Character Counter: Shows current/max characters
- Validation: Uses Zod schema validation before submission
- Toast Feedback: Success/error notifications
- Auto-clear: Resets form on successful submission
CreateRoomModal
Multi-step modal for creating match rooms with team selection, match details, and room settings.Props
Controls modal visibility
Callback to close the modal
Usage Example
Multi-step Flow
- Team Info: Input for Team 1 and Team 2 names
- Match Info: Start date, end date, and match type (ODI/TEST/T20) selection
- Room Settings: Toggle for chat availability (locked/unlocked)
Features
- Step Navigation: Back button adapts based on current step
- Validation: Validates each step before proceeding
- Date Pickers: DateTime pickers for match start/end
- Dropdown: Match type selection dropdown
- Form Reset: Clears all inputs on successful creation
- Centered Modal: Semi-transparent overlay with centered card
LeaderboardPodiumUser
Displays a user in the top 3 podium positions with rank badge and avatar.Props
User statistics object containing:
username: User’s display namemessageCount: Number of messages sent
Podium position (1st, 2nd, or 3rd place)
Usage Example
Visual Description
- Avatar Size: 1st place (96x96), 2nd/3rd place (80x80)
- Rank Badge: Overlapping badge with orange rank number and username
- Styling: Larger avatar for 1st place, smaller margin-top offset
LeaderboardUserRow
Displays a leaderboard user row for positions 4 and below.Props
User statistics object
User’s rank position (0-indexed, so rank 0 = 4th place)
Usage Example
Visual Description
- Badge: Orange circular badge with rank number (#4, #5, etc.)
- User Info: Username and message count
- Message Count: Compact formatted number on right side
- Row Style: Gray background with shadow and active animation
FilterChip
Toggleable filter chip for category selection with selected/unselected states.Props
Text label displayed in the chip
Whether the chip is currently selected
Callback when chip is pressed
Optional Tailwind width class (e.g., “20” for w-20)
Usage Example
Visual States
- Selected: Orange background, white text
- Unselected: Transparent background with orange border, orange text
- Label: Capitalized text
- Shape: Fully rounded pill shape
EmptyState
Displays an empty state placeholder with icon, message, and call-to-action button.Props
Type of empty state to display (determines icon, title, description, and button text)
Callback when CTA button is pressed
Usage Example
Content by Type
| Type | Icon | Title | Description | Button Text |
|---|---|---|---|---|
post | chatbubble-outline | No posts yet! | Be the first one to start the legacy conversation! | Create one! |
comment | chatbox-ellipses-outline | No comments yet! | Be the first one to comment and start a discussion! | Comment now! |
room | chatbubble-ellipses-outline | No rooms yet! | Be the first one to start a room and create the legacy! | Start legacy! |
roomMessage | chatbubble-ellipses-outline | No messages yet! | Be the first to send a message and start the conversation! | Message now! |
Visual Description
- Layout: Centered vertically and horizontally
- Icon: Large gray icon (48pt)
- Title: Bold, large text
- Description: Gray, smaller text with 80% max width
- Button: Orange pill-shaped button with rocket icon
ProfileDrawer
Slide-in navigation drawer from the left side with user profile and navigation links.Props
Current user’s display name
Controls drawer open/closed state
Callback to close the drawer
Reference to search input for focusing when “Explore” is pressed
Usage Example
Navigation Items
- Profile: Navigate to user profile screen
- Explore: Close drawer and focus search input
- Rooms: Navigate to rooms screen
- Settings: Navigate to settings screen
Visual Description
- Width: 80% of screen width
- Animation: Slides in from left with 250ms ease-in transition
- Background: Light gray (
#f8fafc) - Shadow: Drop shadow on right edge
- User Header: Avatar with username
- Navigation Items: Icon + label in vertical list
Related Documentation
- Components Overview - Architecture and patterns
- Post Hooks - Custom hooks for posts and interactions
- Database Schema - TypeScript schemas and database structure