Files
jellyfin-audio-player/src/screens/Music/index.tsx

38 lines
1.7 KiB
TypeScript
Raw Normal View History

2020-06-21 13:02:23 +02:00
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
2022-05-05 22:54:37 +02:00
import { GestureHandlerRootView } from 'react-native-gesture-handler';
2022-01-01 22:36:05 +01:00
import { MusicStackParams } from './types';
2020-06-21 13:02:23 +02:00
import Albums from './stacks/Albums';
import Album from './stacks/Album';
import RecentAlbums from './stacks/RecentAlbums';
2020-07-10 15:25:32 +02:00
import { THEME_COLOR } from 'CONSTANTS';
2020-11-02 22:50:00 +01:00
import { t } from '@localisation';
import useDefaultStyles from 'components/Colors';
2022-01-01 19:09:21 +01:00
import Playlists from './stacks/Playlists';
import Playlist from './stacks/Playlist';
2022-04-09 15:48:01 +02:00
import NowPlaying from './overlays/NowPlaying';
2020-06-21 13:02:23 +02:00
2022-01-01 22:36:05 +01:00
const Stack = createStackNavigator<MusicStackParams>();
2020-06-21 13:02:23 +02:00
function MusicStack() {
const defaultStyles = useDefaultStyles();
2020-06-21 13:02:23 +02:00
return (
2022-05-05 22:54:37 +02:00
<GestureHandlerRootView>
2022-04-09 15:48:01 +02:00
<Stack.Navigator initialRouteName="RecentAlbums" screenOptions={{
headerTintColor: THEME_COLOR,
headerTitleStyle: defaultStyles.stackHeader,
cardStyle: defaultStyles.view,
2022-04-09 15:48:01 +02:00
}}>
<Stack.Screen name="RecentAlbums" component={RecentAlbums} options={{ headerTitle: t('recent-albums') }} />
<Stack.Screen name="Albums" component={Albums} options={{ headerTitle: t('albums') }} />
<Stack.Screen name="Album" component={Album} options={{ headerTitle: t('album') }} />
<Stack.Screen name="Playlists" component={Playlists} options={{ headerTitle: t('playlists') }} />
<Stack.Screen name="Playlist" component={Playlist} options={{ headerTitle: t('playlist') }} />
</Stack.Navigator>
<NowPlaying />
2022-05-05 22:54:37 +02:00
</GestureHandlerRootView>
2020-06-21 13:02:23 +02:00
);
}
export default MusicStack;