2020-06-21 13:02:23 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
|
|
|
import { StackParams } from './types';
|
|
|
|
|
import Albums from './stacks/Albums';
|
|
|
|
|
import Album from './stacks/Album';
|
|
|
|
|
import RecentAlbums from './stacks/RecentAlbums';
|
2020-07-05 23:15:30 +02:00
|
|
|
import Search from './stacks/Search';
|
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';
|
2021-02-13 15:34:43 +01:00
|
|
|
import useDefaultStyles from 'components/Colors';
|
2020-06-21 13:02:23 +02:00
|
|
|
|
|
|
|
|
const Stack = createStackNavigator<StackParams>();
|
|
|
|
|
|
|
|
|
|
function MusicStack() {
|
2021-02-13 15:34:43 +01:00
|
|
|
const defaultStyles = useDefaultStyles();
|
|
|
|
|
|
2020-06-21 13:02:23 +02:00
|
|
|
return (
|
2021-02-13 15:34:43 +01:00
|
|
|
<Stack.Navigator initialRouteName="RecentAlbums" screenOptions={{
|
|
|
|
|
headerTintColor: THEME_COLOR,
|
|
|
|
|
headerTitleStyle: defaultStyles.stackHeader
|
|
|
|
|
}}>
|
2020-11-02 22:50:00 +01: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="Search" component={Search} options={{ headerTitle: t('search') }} />
|
2020-06-21 13:02:23 +02:00
|
|
|
</Stack.Navigator>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default MusicStack;
|