Front: Prettier
This commit is contained in:
committed by
Clément Le Bihan
parent
4577997b1c
commit
fb0e43af88
@@ -150,7 +150,7 @@ export const RawElement = ({ element }: RawElementProps) => {
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return <Translate translationKey='unknownError'/>
|
||||
return <Translate translationKey="unknownError" />;
|
||||
}
|
||||
})()}
|
||||
</Row>
|
||||
|
||||
@@ -92,7 +92,7 @@ const SongsSearchComponent = (props: SongsSearchComponentProps) => {
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
<Translate translationKey='songsFilter' fontSize="xl" fontWeight="bold" mt={4}/>
|
||||
<Translate translationKey="songsFilter" fontSize="xl" fontWeight="bold" mt={4} />
|
||||
<Box>
|
||||
{songData?.length ? (
|
||||
songData.slice(0, props.maxRows).map((comp, index) => (
|
||||
@@ -129,7 +129,7 @@ const ArtistSearchComponent = (props: ItemSearchComponentProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Translate translationKey='artistFilter' fontSize="xl" fontWeight="bold" mt={4} />
|
||||
<Translate translationKey="artistFilter" fontSize="xl" fontWeight="bold" mt={4} />
|
||||
{artistData?.length ? (
|
||||
<CardGridCustom
|
||||
content={artistData
|
||||
@@ -158,7 +158,7 @@ const GenreSearchComponent = (props: ItemSearchComponentProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Translate translationKey='genreFilter' fontSize="xl" fontWeight="bold" mt={4}/>
|
||||
<Translate translationKey="genreFilter" fontSize="xl" fontWeight="bold" mt={4} />
|
||||
{genreData?.length ? (
|
||||
<CardGridCustom
|
||||
content={genreData.slice(0, props.maxItems ?? genreData.length).map((g) => ({
|
||||
@@ -193,7 +193,7 @@ const FavoritesComponent = () => {
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
<Translate translationKey='songsFilter' fontSize="xl" fontWeight="bold" mt={4}/>
|
||||
<Translate translationKey="songsFilter" fontSize="xl" fontWeight="bold" mt={4} />
|
||||
<Box>
|
||||
{favoritesQuery.data?.map((songData) => (
|
||||
<FavSongRow
|
||||
@@ -259,7 +259,9 @@ const FilterSwitch = () => {
|
||||
case 'favorites':
|
||||
return <FavoritesComponent />;
|
||||
default:
|
||||
return <Translate translationKey='unknownError' format={(e) => `${e}: ${currentFilter}`}/>;
|
||||
return (
|
||||
<Translate translationKey="unknownError" format={(e) => `${e}: ${currentFilter}`} />
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,10 @@ const SongHistory = (props: { quantity: number }) => {
|
||||
return (
|
||||
<View>
|
||||
{musics.length === 0 ? (
|
||||
<Translate style={{ paddingHorizontal: 16 }} translationKey='menuNoSongsPlayedYet'/>
|
||||
<Translate
|
||||
style={{ paddingHorizontal: 16 }}
|
||||
translationKey="menuNoSongsPlayedYet"
|
||||
/>
|
||||
) : (
|
||||
musics.map((song) => (
|
||||
<View
|
||||
|
||||
@@ -306,14 +306,15 @@ export const en = {
|
||||
emptySelection: 'None,',
|
||||
gamesPlayed: 'Games Played',
|
||||
metronome: 'Metronome',
|
||||
loading: "Loading... Please Wait",
|
||||
loading: 'Loading... Please Wait',
|
||||
emailCheckFailed: 'Email verification failed. The token has expired or is invalid.',
|
||||
chromacasePitch: 'Chromacase is a free and open source project that aims to provide a complete learning experience for anyone willing to learn piano.',
|
||||
chromacasePitch:
|
||||
'Chromacase is a free and open source project that aims to provide a complete learning experience for anyone willing to learn piano.',
|
||||
whatIsChromacase: 'What is Chromacase?',
|
||||
clickHereForMoreInfo: 'Click here for more info',
|
||||
forgotPassword: 'I forgot my password',
|
||||
updateProfile: 'Update Profile',
|
||||
accountCreatedOn: 'Account Created on'
|
||||
accountCreatedOn: 'Account Created on',
|
||||
};
|
||||
|
||||
export const fr: typeof en = {
|
||||
@@ -624,14 +625,15 @@ export const fr: typeof en = {
|
||||
emptySelection: 'Aucun',
|
||||
gamesPlayed: 'Parties Jouées',
|
||||
metronome: 'Métronome',
|
||||
loading: "Chargement en cours... Veuillez Patienter",
|
||||
loading: 'Chargement en cours... Veuillez Patienter',
|
||||
emailCheckFailed: 'La vérification du mail a échouée',
|
||||
chromacasePitch: 'ChromaCase est une solution gratuite et opens-source qui cherche à fournir une experience d\'apprentissage complete pour toutes les perosnne qui chercheraient à apprendre le piano.',
|
||||
whatIsChromacase: 'Chromacase c\'est quoi?',
|
||||
clickHereForMoreInfo: 'Cliquez ici pour plus d\'info',
|
||||
forgotPassword: 'J\'ai oublié mon mot de passe',
|
||||
chromacasePitch:
|
||||
"ChromaCase est une solution gratuite et opens-source qui cherche à fournir une experience d'apprentissage complete pour toutes les perosnne qui chercheraient à apprendre le piano.",
|
||||
whatIsChromacase: "Chromacase c'est quoi?",
|
||||
clickHereForMoreInfo: "Cliquez ici pour plus d'info",
|
||||
forgotPassword: "J'ai oublié mon mot de passe",
|
||||
updateProfile: 'Changer le Profile',
|
||||
accountCreatedOn: 'Compte créé le'
|
||||
accountCreatedOn: 'Compte créé le',
|
||||
};
|
||||
|
||||
export const sp: typeof en = {
|
||||
@@ -949,12 +951,13 @@ export const sp: typeof en = {
|
||||
emptySelection: 'Nada',
|
||||
gamesPlayed: 'Juegos jugados',
|
||||
metronome: 'Metrónomo',
|
||||
loading: "Cargando por favor espere",
|
||||
loading: 'Cargando por favor espere',
|
||||
emailCheckFailed: 'Error en la verificación del correo electrónico',
|
||||
chromacasePitch: 'ChromaCase es una solución gratuita y de código abierto que busca brindar una experiencia de aprendizaje completa para cualquiera que desee aprender a tocar el piano.',
|
||||
chromacasePitch:
|
||||
'ChromaCase es una solución gratuita y de código abierto que busca brindar una experiencia de aprendizaje completa para cualquiera que desee aprender a tocar el piano.',
|
||||
whatIsChromacase: '¿Qué es la cromacasa?',
|
||||
clickHereForMoreInfo: 'Haga clic aquí para más información',
|
||||
forgotPassword: 'Olvidé mi contraseña',
|
||||
updateProfile: 'Cambiar el perfil',
|
||||
accountCreatedOn: 'Cuenta creada el'
|
||||
accountCreatedOn: 'Cuenta creada el',
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ const GoogleView = () => {
|
||||
run();
|
||||
}, []);
|
||||
|
||||
return <Translate translate={'loading'} />
|
||||
return <Translate translate={'loading'} />;
|
||||
};
|
||||
|
||||
export default GoogleView;
|
||||
|
||||
@@ -98,7 +98,7 @@ export const FavoritesMusic = () => {
|
||||
export const RecentlyPlayedMusic = () => {
|
||||
return (
|
||||
<Center style={{ flex: 1 }}>
|
||||
<Translate translationKey='recentlyPlayed' />
|
||||
<Translate translationKey="recentlyPlayed" />
|
||||
</Center>
|
||||
);
|
||||
};
|
||||
@@ -106,7 +106,7 @@ export const RecentlyPlayedMusic = () => {
|
||||
export const StepUpMusic = () => {
|
||||
return (
|
||||
<Center style={{ flex: 1 }}>
|
||||
<Translate translationKey='musicTabStepUp'/>
|
||||
<Translate translationKey="musicTabStepUp" />
|
||||
</Center>
|
||||
);
|
||||
};
|
||||
@@ -171,7 +171,10 @@ const MusicTab = (props: RouteProps<object>) => {
|
||||
}}
|
||||
renderLabel={({ route, color }) =>
|
||||
layout.width > 800 && (
|
||||
<Translate translationKey={route.title as TranslationKey} style={{ color: color, paddingLeft: 10, overflow: 'hidden' }}/>
|
||||
<Translate
|
||||
translationKey={route.title as TranslationKey}
|
||||
style={{ color: color, paddingLeft: 10, overflow: 'hidden' }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
tabStyle={{ flexDirection: 'row' }}
|
||||
|
||||
@@ -86,9 +86,13 @@ const ProfileView = (props: RouteProps<{}>) => {
|
||||
onPress={async () => navigation.navigate('Settings', {})}
|
||||
/>
|
||||
</View>
|
||||
<Translate style={{ paddingBottom: 10, fontWeight: 'bold' }} translationKey='accountCreatedOn' format={(e) => (
|
||||
`${e} ${userQuery.data.data.createdAt.toLocaleDateString()}`
|
||||
)} />
|
||||
<Translate
|
||||
style={{ paddingBottom: 10, fontWeight: 'bold' }}
|
||||
translationKey="accountCreatedOn"
|
||||
format={(e) =>
|
||||
`${e} ${userQuery.data.data.createdAt.toLocaleDateString()}`
|
||||
}
|
||||
/>
|
||||
<Flex
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
@@ -96,12 +100,19 @@ const ProfileView = (props: RouteProps<{}>) => {
|
||||
paddingBottom: 10,
|
||||
}}
|
||||
>
|
||||
<Translate translationKey="gamesPlayed" format={(e) => `${userQuery.data.data.gamesPlayed} ${e}`} />
|
||||
<Translate
|
||||
translationKey="gamesPlayed"
|
||||
format={(e) => `${userQuery.data.data.gamesPlayed} ${e}`}
|
||||
/>
|
||||
</Flex>
|
||||
</Column>
|
||||
</View>
|
||||
<Row style={{ alignItems: 'center', paddingBottom: 20 }}>
|
||||
<Translate style={{ paddingRight: 20 }} translationKey='level' format={(e) => `${e} ${level}`} />
|
||||
<Translate
|
||||
style={{ paddingRight: 20 }}
|
||||
translationKey="level"
|
||||
format={(e) => `${e} ${level}`}
|
||||
/>
|
||||
<Progress
|
||||
bgColor={colors.coolGray[500]}
|
||||
value={progessValue}
|
||||
|
||||
@@ -153,9 +153,9 @@ const StartPageView = () => {
|
||||
}}
|
||||
>
|
||||
<Heading fontSize="4xl" style={{ textAlign: 'center' }}>
|
||||
<Translate translationKey='whatIsChromacase' />
|
||||
<Translate translationKey="whatIsChromacase" />
|
||||
</Heading>
|
||||
<Translate fontSize={'xl'} translationKey='chromacasePitch' />
|
||||
<Translate fontSize={'xl'} translationKey="chromacasePitch" />
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
@@ -173,7 +173,7 @@ const StartPageView = () => {
|
||||
}}
|
||||
>
|
||||
<Link href="http://eip.epitech.eu/2024/chromacase" isExternal>
|
||||
<Translate translationKey='clickHereForMoreInfo' />
|
||||
<Translate translationKey="clickHereForMoreInfo" />
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -192,7 +192,7 @@ const StartPageView = () => {
|
||||
}}
|
||||
>
|
||||
<Link href="/forgot_password">
|
||||
<Translate translationKey='forgotPassword' />
|
||||
<Translate translationKey="forgotPassword" />
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -12,13 +12,7 @@ import {
|
||||
Route,
|
||||
SceneRendererProps,
|
||||
} from 'react-native-tab-view';
|
||||
import {
|
||||
HeartEdit,
|
||||
UserEdit,
|
||||
Notification,
|
||||
SecurityUser,
|
||||
FolderCross,
|
||||
} from 'iconsax-react-native';
|
||||
import { HeartEdit, UserEdit, Notification, SecurityUser, FolderCross } from 'iconsax-react-native';
|
||||
import { Scene } from 'react-native-tab-view/lib/typescript/src/types';
|
||||
import { RouteProps } from '../../Navigation';
|
||||
import ScaffoldCC from '../../components/UI/ScaffoldCC';
|
||||
|
||||
Reference in New Issue
Block a user