Renamed getGenres and getArtists to getAllGenres and getAllArtists and removed HomeNew from navigation

This commit is contained in:
Clément Le Bihan
2023-12-06 15:03:32 +01:00
parent f9cb289eff
commit 81717ec5b1
6 changed files with 7 additions and 13 deletions
+2 -2
View File
@@ -400,7 +400,7 @@ export default class API {
};
}
public static getGenres(): Query<Genre[]> {
public static getAllGenres(): Query<Genre[]> {
return {
key: ['genres'],
exec: () =>
@@ -446,7 +446,7 @@ export default class API {
};
}
public static getArtists(): Query<Artist[]> {
public static getAllArtists(): Query<Artist[]> {
return {
key: ['artists'],
exec: () =>
-6
View File
@@ -30,7 +30,6 @@ import SigninView from './views/SigninView';
import SignupView from './views/SignupView';
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';
import Leaderboardiew from './views/LeaderboardView';
@@ -50,11 +49,6 @@ const protectedRoutes = () =>
options: { headerShown: false },
link: '/music',
},
HomeNew: {
component: DiscoveryView,
options: { headerShown: false },
link: '/V2',
},
Play: {
component: PlayView,
options: { headerShown: false, title: translate('play') },
+1 -1
View File
@@ -108,7 +108,7 @@ const ScoreModal = (props: ScoreModalProps) => {
onPress={() =>
navigation.canGoBack()
? navigation.goBack()
: navigation.navigate('HomeNew', {})
: navigation.navigate('Home', {})
}
/>
</Row>
+1 -1
View File
@@ -10,7 +10,7 @@ import ScaffoldMobileCC from './ScaffoldMobileCC';
import { useAssets } from 'expo-asset';
const menu = [
{ type: 'main', title: 'menuDiscovery', icon: Discover, link: 'HomeNew' },
{ type: 'main', title: 'menuDiscovery', icon: Discover, link: 'Home' },
{ type: 'main', title: 'menuProfile', icon: User, link: 'User' },
{ type: 'main', title: 'menuMusic', icon: Music, link: 'Music' },
{ type: 'main', title: 'menuSearch', icon: SearchNormal1, link: 'Search' },
+2 -2
View File
@@ -43,8 +43,8 @@ const SearchBarComponent = () => {
const [query, setQuery] = React.useState('');
const [genre, setGenre] = React.useState({} as Genre | undefined);
const [artist, setArtist] = React.useState('');
const artistsQuery = useQuery(API.getArtists());
const genresQuery = useQuery(API.getGenres());
const artistsQuery = useQuery(API.getAllArtists());
const genresQuery = useQuery(API.getAllGenres());
if (artistsQuery.isLoading || genresQuery.isLoading) {
return <LoadingView />;
+1 -1
View File
@@ -93,7 +93,7 @@ const HomeView = (props: RouteProps<{}>) => {
label={'V2'}
colorScheme="gray"
size="sm"
onPress={() => navigation.navigate('HomeNew', {})}
onPress={() => navigation.navigate('Home', {})}
/>
</HStack>
<Box style={{ width: '100%' }}>