big ol' impl of zustand for settings/family states

still need to move track player state over for non-react access to that
This commit is contained in:
austinried
2021-08-01 16:30:28 +09:00
parent ebc31e6d05
commit 8b17ebe9c2
26 changed files with 809 additions and 779 deletions

View File

@@ -1,9 +1,8 @@
import BottomTabBar from '@app/navigation/BottomTabBar'
import LibraryTopTabNavigator from '@app/navigation/LibraryTopTabNavigator'
import AlbumView from '@app/screens/AlbumView'
import SongListView from '@app/screens/SongListView'
import ArtistView from '@app/screens/ArtistView'
import Home from '@app/screens/Home'
import PlaylistView from '@app/screens/PlaylistView'
import Search from '@app/screens/Search'
import ServerView from '@app/screens/ServerView'
import SettingsView from '@app/screens/Settings'
@@ -30,7 +29,7 @@ type AlbumScreenProps = {
}
const AlbumScreen: React.FC<AlbumScreenProps> = ({ route }) => (
<AlbumView id={route.params.id} title={route.params.title} />
<SongListView id={route.params.id} title={route.params.title} type="album" />
)
type ArtistScreenNavigationProp = NativeStackNavigationProp<TabStackParamList, 'artist'>
@@ -52,7 +51,7 @@ type PlaylistScreenProps = {
}
const PlaylistScreen: React.FC<PlaylistScreenProps> = ({ route }) => (
<PlaylistView id={route.params.id} title={route.params.title} />
<SongListView id={route.params.id} title={route.params.title} type="playlist" />
)
const styles = StyleSheet.create({

View File

@@ -1,5 +1,5 @@
import BottomTabNavigator from '@app/navigation/BottomTabNavigator'
import NowPlayingLayout from '@app/screens/NowPlayingLayout'
import NowPlayingView from '@app/screens/NowPlayingView'
import colors from '@app/styles/colors'
import { DarkTheme, NavigationContainer } from '@react-navigation/native'
import React from 'react'
@@ -32,7 +32,7 @@ const RootNavigator = () => (
}}
initialRouteName="main">
<RootStack.Screen name="main" component={BottomTabNavigator} />
<RootStack.Screen name="now-playing" component={NowPlayingLayout} />
<RootStack.Screen name="now-playing" component={NowPlayingView} />
</RootStack.Navigator>
</NavigationContainer>
)