The Lik app features a comprehensive profile navigation system that allows users to seamlessly navigate between user and restaurant profiles from any content across the app.
The profile navigation system is built around two main callback functions:
onShowUserProfile: (userId: string) => void- Navigate to user profilesonShowRestaurantProfile: (restaurantId: string) => void- Navigate to restaurant profiles
These callbacks are passed down through the component hierarchy from App.tsx to all content components.
App.tsx manages the navigation state:
const [showRestaurantProfile, setShowRestaurantProfile] = useState<string | null>(null);
const [showUserProfile, setShowUserProfile] = useState<string | null>(null);When a profile is requested, the app:
- Sets the profile ID state
- Renders the profile component
- Hides the bottom navigation
- Disables swipe gestures
- UserProfile: Displays user profiles with stats, posts, and social features
- RestaurantProfile: Shows restaurant information, menu, reviews, and awards
Both profiles include:
- Back navigation
- Profile switching capability
- Responsive design for mobile/tablet
- Review Cards: User names and restaurant names are clickable
- Stories Bar: User avatars and usernames navigate to profiles
- Top Navigation: User avatar navigates to current user profile
- User Posts: Profile avatars, display names, and restaurant mentions
- Restaurant Posts: Restaurant avatars, names, and verification badges
- Ad Posts: Sponsored restaurant profiles
- Food Cards: User profile pictures and display names
- Restaurant Listings: Restaurant names and avatars (in delivery mode)
- Cart/Favorites: Restaurant references in saved items
- CommentModal: Passes profile navigation to comment items
- CommentItem: User avatars and usernames are clickable
- Nested Comments: All threaded replies maintain profile navigation
- StoriesBar: Story avatars and usernames
- StoryViewer: Profile information within story overlay
- Post Component: Author avatars, usernames, and location tags
- Like/Comment Interface: Tagged users and mentions
Users can access profiles by clicking:
- Avatars: Profile pictures anywhere in the app
- Usernames: Display names and @mentions
- Attribution: "Posted by" or "Reviewed by" text
- Comment Authors: Names in comment threads
Restaurant profiles are accessible via:
- Restaurant Names: In posts, reviews, and listings
- Location Tags: Geographic references
- Menu Items: Restaurant attribution
- Review Context: Restaurant mentions in user reviews
- All clickable profile elements meet 44px minimum touch target size
- Visual feedback on tap (scale/opacity changes)
- Haptic feedback where appropriate
- Profile navigation works alongside swipe gestures
- Does not interfere with story navigation
- Maintains scroll behavior in feeds
- Profile navigation adapts to screen sizes
- Touch-first design for mobile
- Optimized for one-handed usage
The app clearly distinguishes between profile types:
User Profiles:
- Personal avatars and usernames
- Level badges and XP progression
- Social stats (followers, following, posts)
- User-generated content
Restaurant Profiles:
- Business logos and names
- Verification badges for partners
- Star ratings and reviews
- Menu integration and ordering
- Verification Badges: Blue checkmarks for verified accounts
- Partner Badges: Special indicators for Lik partners
- Business Hours: Open/closed status for restaurants
- Level Indicators: XP levels for user accounts
The profile system supports:
- Direct profile URLs
- Back navigation history
- Cross-profile navigation
- Breadcrumb trails
- Profile Not Found: Graceful fallback to default state
- Network Issues: Offline profile caching
- Invalid IDs: Silent failure with user feedback
- Screen Reader Support: All profile links properly labeled
- Keyboard Navigation: Tab order and focus management
- High Contrast: Profile elements visible in all themes
- Voice Control: Profile names spoken for navigation
- Lazy Loading: Profile data loaded on demand
- Caching: Recently viewed profiles cached locally
- Preloading: Common profiles preloaded in background
- Memory Management: Profile state cleanup on navigation
This comprehensive profile navigation system ensures users can effortlessly explore the social graph and discover new content throughout their Lik experience.