Closed lehuygiang28 closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vphim-fe | 🛑 Canceled (Inspect) | Oct 2, 2024 10:52am | ||
vphim-mnt | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 2, 2024 10:52am |
This pull request refactors the mobile app to use expo-router
for navigation, replacing the previous React Navigation setup. The changes primarily affect the navigation structure, route handling, and some component implementations to align with the new routing system.
sequenceDiagram
participant User
participant AppLayout
participant TabsLayout
participant HomeScreen
participant ExploreScreen
participant MovieDetailsScreen
User->>AppLayout: Opens app
AppLayout->>TabsLayout: Renders tabs
TabsLayout->>HomeScreen: Navigates to Home
User->>HomeScreen: Selects a movie
HomeScreen->>MovieDetailsScreen: router.push('/movie/[slug]')
User->>TabsLayout: Switches to Explore tab
TabsLayout->>ExploreScreen: Renders Explore screen
User->>ExploreScreen: Performs search
ExploreScreen->>MovieDetailsScreen: router.push('/movie/[slug]')
Change | Details | Files |
---|---|---|
Replaced React Navigation with expo-router for app navigation |
|
apps/mobile/src/app/(tabs)/index.tsx apps/mobile/src/app/(tabs)/explore.tsx apps/mobile/src/app/movie/[slug].tsx apps/mobile/src/app/_layout.tsx apps/mobile/src/app/(tabs)/_layout.tsx |
Refactored MovieDetailsScreen component to use expo-router |
|
apps/mobile/src/app/movie/[slug].tsx |
Updated MovieEpisode component to improve episode and server selection |
|
apps/mobile/src/components/movie-episode.tsx |
Created new AppHeader component for consistent header across the app |
|
apps/mobile/src/components/app-header.tsx apps/mobile/src/app/(tabs)/_layout.tsx |
Updated app configuration to support expo-router |
|
apps/mobile/app.json |
The changes introduce a new URL scheme for deep linking in the mobile application, transition navigation from React Navigation to Expo Router, and implement a tabbed navigation layout. Several components have been added or modified to accommodate these changes, including the creation of a new TabsLayout
and AppHeader
components. Dependencies related to React Navigation have been removed from the project, and various files have been updated to streamline navigation and state management.
File Path | Change Summary |
---|---|
apps/mobile/app.json |
Added a new property "scheme": "vephim" to the expo configuration for deep linking. |
apps/mobile/index.js |
Commented out import statements and the call to registerRootComponent , replaced with an import for expo-router/entry . |
apps/mobile/package.json |
Removed navigation dependencies (@react-navigation/drawer , @react-navigation/native , @react-navigation/bottom-tabs , @react-navigation/native-stack ), and added "main": "index.js" entry point. |
apps/mobile/src/app/(tabs)/_layout.tsx |
Introduced TabsLayout component for tabbed navigation, defining layout and behavior for the tab bar with custom theming. |
apps/mobile/src/app/(tabs)/explore.tsx |
Updated navigation logic to use expo-router , simplifying state management and removing unnecessary hooks. |
apps/mobile/src/app/(tabs)/index.tsx |
Transitioned navigation from React Navigation to Expo Router, removing related type definitions. |
apps/mobile/src/app/_layout.tsx |
Added AppLayout component as the main layout for the application, integrating various providers and defining routing structure. |
apps/mobile/src/app/index.tsx |
Deleted the file containing the main application logic using React Navigation. |
apps/mobile/src/app/movie/[slug].tsx |
Refactored episode selection and playback logic, simplifying state management and error handling. |
apps/mobile/src/components/app-header.tsx |
Introduced AppHeader component for consistent navigation and search functionality, utilizing react-native-paper components. |
apps/mobile/src/components/movie-episode.tsx |
Updated MovieEpisode component props and internal logic for better state management and episode selection. |
package.json |
Updated dependency versions and removed navigation-related dependencies. |
mobile
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by Sourcery
Refactor the mobile application to use
expo-router
for navigation, replacingreact-navigation
and simplifying the navigation logic across multiple screens. Introduce a new app layout with a custom header and tab navigation, and enhance the movie episode component for better episode and server management.New Features:
expo-router
with a custom header and tab navigation for the mobile application.Enhancements:
expo-router
for navigation and local search parameters, simplifying the navigation logic.expo-router
for navigation, removing the dependency onreact-navigation
.Summary by CodeRabbit
Release Notes
New Features
TabsLayout
component for a tabbed navigation interface.AppHeader
component for improved navigation and search functionality.Improvements
MovieDetailsScreen
.Chores