Format code

This commit is contained in:
2024-01-08 17:23:59 +01:00
committed by Clément Le Bihan
parent 3c04e8bb39
commit b5b94adc83
7 changed files with 55 additions and 62 deletions
+1 -3
View File
@@ -106,9 +106,7 @@ const ScoreModal = (props: ScoreModalProps) => {
type="filled"
title={translate('menuMusic')}
onPress={() =>
navigation.canGoBack()
? navigation.goBack()
: navigation.navigate('Home')
navigation.canGoBack() ? navigation.goBack() : navigation.navigate('Home')
}
/>
</Row>
+4 -4
View File
@@ -7,15 +7,13 @@ import API from '../../API';
import ButtonBase from './ButtonBase';
import { Icon } from 'iconsax-react-native';
import { LoadingView } from '../Loading';
import { Translate, TranslationKey, translate } from '../../i18n/i18n';
import { Translate, translate } from '../../i18n/i18n';
import { useNavigation } from '../../Navigation';
import Spacer from './Spacer';
import User from '../../models/User';
import LogoutButtonCC from './LogoutButtonCC';
import GlassmorphismCC from './Glassmorphism';
import { BottomTabBarProps } from '@react-navigation/bottom-tabs';
import { ReactElement } from 'react';
import { NavigationState, ParamListBase } from '@react-navigation/native';
import { NavigationState } from '@react-navigation/native';
// TODO a tester avec un historique de plus de 3 musics différente mdr !!
const SongHistory = (props: { quantity: number }) => {
@@ -176,6 +174,7 @@ const ScaffoldDesktopCC = ({
if ((options as any).subMenu) return null;
return (
<NavigationButton
key={route.name}
isSmallScreen={!!isSmallScreen}
label={options.title !== undefined ? options.title : route.name}
icon={options.tabBarIcon as Icon}
@@ -214,6 +213,7 @@ const ScaffoldDesktopCC = ({
if (!(options as any).subMenu) return null;
return (
<NavigationButton
key={route.key}
isSmallScreen={!!isSmallScreen}
label={options.title !== undefined ? options.title : route.name}
icon={options.tabBarIcon as Icon}
+2 -2
View File
@@ -1,7 +1,7 @@
import { View } from 'react-native';
import { Flex, useMediaQuery, useTheme } from 'native-base';
import ButtonBase from './ButtonBase';
import { Discover, Icon } from 'iconsax-react-native';
import { Icon } from 'iconsax-react-native';
import { translate } from '../../i18n/i18n';
import { BottomTabBarProps } from '@react-navigation/bottom-tabs';
import { ComponentProps } from 'react';
@@ -66,6 +66,6 @@ const ScaffoldMobileCC = ({ state, descriptors, navigation }: BottomTabBarProps)
// This is needed to bypass a bug in react-navigation that calls custom tabBars weirdly
const Wrapper = (props: ComponentProps<typeof ScaffoldMobileCC>) => {
return <ScaffoldMobileCC {...props} />;
}
};
export default Wrapper;