Custom Tabs Swipe View Feature

This branch implements the feature to make custom tabs behave like the "Posts" tab, allowing vals in custom tabs to be viewed in the swipe viewer.

Changes Made

  1. ValGrid Component:

    • Updated to support swipe viewer for both "Posts" tab and any custom tabs
    • Added logic to only exclude "code" tab from swipe viewer functionality
  2. ValGridItem Component:

    • Modified to handle link URLs differently based on tab types
    • Added special handling for code tab items to always link directly to Val Town
    • Improved UI indicators to show when swipe view is available
  3. Project Refactoring:

    • Created a new ProfileTabs.tsx component to extract tab navigation and content functionality
    • Split UserProfile.tsx code into smaller, more maintainable components
    • Added proper tab switching functionality within components

How It Works

Custom tabs now have the same behavior as the "Posts" tab:

  • When clicking on a val in a custom tab, if it has a proper URL (from moiConfig or httpEndpoint), it will open in the swipe viewer
  • Users can swipe through all vals in that custom tab
  • This maintains the existing behavior of the "code" tab, which still links directly to Val Town

Testing Notes

  • Verify that custom tabs show the swipe viewer when clicking on vals
  • Confirm that swipe navigation works within custom tabs
  • Check that the "code" tab still links directly to Val Town pages
  • Test that "View All Code" button works correctly when a custom tab has no content