mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
playlist tab/view
This commit is contained in:
@@ -4,6 +4,7 @@ import AlbumView from '@app/screens/AlbumView'
|
||||
import ArtistsList from '@app/screens/ArtistsList'
|
||||
import ArtistView from '@app/screens/ArtistView'
|
||||
import Home from '@app/screens/Home'
|
||||
import PlaylistView from '@app/screens/PlaylistView'
|
||||
import SettingsView from '@app/screens/Settings'
|
||||
import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
@@ -17,6 +18,7 @@ type TabStackParamList = {
|
||||
TabMain: { toTop?: boolean }
|
||||
AlbumView: { id: string; title: string }
|
||||
ArtistView: { id: string; title: string }
|
||||
PlaylistView: { id: string; title: string }
|
||||
}
|
||||
|
||||
type AlbumScreenNavigationProp = NativeStackNavigationProp<TabStackParamList, 'AlbumView'>
|
||||
@@ -41,6 +43,17 @@ const ArtistScreen: React.FC<ArtistScreenProps> = ({ route }) => (
|
||||
<ArtistView id={route.params.id} title={route.params.title} />
|
||||
)
|
||||
|
||||
type PlaylistScreenNavigationProp = NativeStackNavigationProp<TabStackParamList, 'PlaylistView'>
|
||||
type PlaylistScreenRouteProp = RouteProp<TabStackParamList, 'PlaylistView'>
|
||||
type PlaylistScreenProps = {
|
||||
route: PlaylistScreenRouteProp
|
||||
navigation: PlaylistScreenNavigationProp
|
||||
}
|
||||
|
||||
const PlaylistScreen: React.FC<PlaylistScreenProps> = ({ route }) => (
|
||||
<PlaylistView id={route.params.id} title={route.params.title} />
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
stackheaderStyle: {
|
||||
backgroundColor: colors.gradient.high,
|
||||
@@ -75,6 +88,7 @@ function createTabStackNavigator(Component: React.ComponentType<any>) {
|
||||
<Stack.Screen name="TabMain" component={Component} options={{ headerShown: false }} />
|
||||
<Stack.Screen name="AlbumView" component={AlbumScreen} options={itemScreenOptions} />
|
||||
<Stack.Screen name="ArtistView" component={ArtistScreen} options={itemScreenOptions} />
|
||||
<Stack.Screen name="PlaylistView" component={PlaylistScreen} options={itemScreenOptions} />
|
||||
</Stack.Navigator>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user