Merge branch 'main' into feature/adc/#243-leaderboard
This commit is contained in:
+21
-24
@@ -10,11 +10,8 @@ import { DarkTheme, DefaultTheme, NavigationContainer } from '@react-navigation/
|
||||
import { RootState, useSelector } from './state/Store';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { Translate, translate } from './i18n/i18n';
|
||||
import SongLobbyView from './views/SongLobbyView';
|
||||
import StartPageView from './views/StartPageView';
|
||||
import HomeView from './views/HomeView';
|
||||
import SearchView from './views/SearchView';
|
||||
import SetttingsNavigator from './views/settings/SettingsView';
|
||||
import SettingsTab from './views/settings/SettingsView';
|
||||
import { useQuery } from './Queries';
|
||||
import API, { APIError } from './API';
|
||||
import PlayView from './views/PlayView';
|
||||
@@ -32,10 +29,11 @@ import GoogleView from './views/GoogleView';
|
||||
import VerifiedView from './views/VerifiedView';
|
||||
import SigninView from './views/SigninView';
|
||||
import SignupView from './views/SignupView';
|
||||
import TabNavigation from './components/V2/TabNavigation';
|
||||
import PasswordResetView from './views/PasswordResetView';
|
||||
import ForgotPasswordView from './views/ForgotPasswordView';
|
||||
import Leaderboardiew from './views/LeaderboardView';
|
||||
import DiscoveryView from './views/V2/DiscoveryView';
|
||||
import MusicView from './views/MusicView';
|
||||
|
||||
// Util function to hide route props in URL
|
||||
const removeMe = () => '';
|
||||
@@ -43,29 +41,33 @@ const removeMe = () => '';
|
||||
const protectedRoutes = () =>
|
||||
({
|
||||
Home: {
|
||||
component: HomeView,
|
||||
options: { title: translate('welcome'), headerLeft: null },
|
||||
component: DiscoveryView,
|
||||
options: { headerShown: false },
|
||||
link: '/',
|
||||
},
|
||||
Music: {
|
||||
component: MusicView,
|
||||
options: { headerShown: false },
|
||||
link: '/music',
|
||||
},
|
||||
HomeNew: {
|
||||
component: TabNavigation,
|
||||
component: DiscoveryView,
|
||||
options: { headerShown: false },
|
||||
link: '/V2',
|
||||
},
|
||||
Play: { component: PlayView, options: { title: translate('play') }, link: '/play/:songId' },
|
||||
Play: {
|
||||
component: PlayView,
|
||||
options: { headerShown: false, title: translate('play') },
|
||||
link: '/play/:songId',
|
||||
},
|
||||
Settings: {
|
||||
component: SetttingsNavigator,
|
||||
options: { title: 'Settings' },
|
||||
component: SettingsTab,
|
||||
options: { headerShown: false },
|
||||
link: '/settings/:screen?',
|
||||
stringify: {
|
||||
screen: removeMe,
|
||||
},
|
||||
},
|
||||
Song: {
|
||||
component: SongLobbyView,
|
||||
options: { title: translate('play') },
|
||||
link: '/song/:songId',
|
||||
},
|
||||
Artist: {
|
||||
component: ArtistDetailsView,
|
||||
options: { title: translate('artistFilter') },
|
||||
@@ -83,7 +85,7 @@ const protectedRoutes = () =>
|
||||
},
|
||||
Search: {
|
||||
component: SearchView,
|
||||
options: { title: translate('search') },
|
||||
options: { headerShown: false },
|
||||
link: '/search/:query?',
|
||||
},
|
||||
Leaderboard: {
|
||||
@@ -96,7 +98,7 @@ const protectedRoutes = () =>
|
||||
options: { title: translate('error'), headerLeft: null },
|
||||
link: undefined,
|
||||
},
|
||||
User: { component: ProfileView, options: { title: translate('user') }, link: '/user' },
|
||||
User: { component: ProfileView, options: { headerShown: false }, link: '/user' },
|
||||
Verified: {
|
||||
component: VerifiedView,
|
||||
options: { title: 'Verify email', headerShown: false },
|
||||
@@ -106,11 +108,6 @@ const protectedRoutes = () =>
|
||||
|
||||
const publicRoutes = () =>
|
||||
({
|
||||
Start: {
|
||||
component: StartPageView,
|
||||
options: { title: 'Chromacase', headerShown: false },
|
||||
link: '/',
|
||||
},
|
||||
Login: {
|
||||
component: SigninView,
|
||||
options: { title: translate('signInBtn'), headerShown: false },
|
||||
@@ -217,7 +214,7 @@ const ProfileErrorView = (props: { onTryAgain: () => void }) => {
|
||||
<TextButton
|
||||
onPress={() => {
|
||||
dispatch(unsetAccessToken());
|
||||
navigation.navigate('Start');
|
||||
navigation.navigate('Login');
|
||||
}}
|
||||
colorScheme="error"
|
||||
variant="outline"
|
||||
|
||||
Reference in New Issue
Block a user