From 4c1891fb44b02d977f087999f24d43f9d9632b19 Mon Sep 17 00:00:00 2001 From: danis Date: Fri, 27 Oct 2023 13:48:22 +0200 Subject: [PATCH] pretty --- front/components/V2/TabNavigation.tsx | 2 +- front/i18n/Translations.ts | 2 +- front/views/LeaderboardView.tsx | 83 ++++++++++++++++----------- front/views/PlayView.tsx | 2 +- 4 files changed, 53 insertions(+), 36 deletions(-) diff --git a/front/components/V2/TabNavigation.tsx b/front/components/V2/TabNavigation.tsx index 3ebd134..75eb67e 100644 --- a/front/components/V2/TabNavigation.tsx +++ b/front/components/V2/TabNavigation.tsx @@ -46,7 +46,7 @@ const tabs = [ { id: 'leaderboard', label: 'Leaderboard', - icon: , + icon: , iconName: 'medal', }, { diff --git a/front/i18n/Translations.ts b/front/i18n/Translations.ts index aab63c9..f9ad22f 100644 --- a/front/i18n/Translations.ts +++ b/front/i18n/Translations.ts @@ -208,7 +208,7 @@ export const fr: typeof en = { lastScore: 'Dernier Score', bestStreak: 'Meilleure série', precision: 'Précision', - leaderboardTitle: 'Tableau d\'honneur', + leaderboardTitle: "Tableau d'honneur", langBtn: 'Langage', backBtn: 'Retour', diff --git a/front/views/LeaderboardView.tsx b/front/views/LeaderboardView.tsx index d4487e9..0eafcc9 100644 --- a/front/views/LeaderboardView.tsx +++ b/front/views/LeaderboardView.tsx @@ -8,9 +8,9 @@ import { Ionicons } from '@expo/vector-icons'; type PodiumCardProps = { offset: number; medalColor: string; -} +}; -const PodiumCardComponent = ({offset, medalColor}: PodiumCardProps) => { +const PodiumCardComponent = ({ offset, medalColor }: PodiumCardProps) => { return ( { flexDirection: 'column', justifyContent: 'center', alignItems: 'center', - marginLeft: 32 + marginLeft: 32, }} > { borderRadius: 12, }} /> - + - { > Momo - { ); -} +}; const BoardRowComponent = () => { return ( - { shadowOffset: { width: 0, height: 4 }, shadowOpacity: 1, shadowRadius: 4, - marginTop: 10 + marginTop: 10, }} > @@ -109,7 +119,7 @@ const BoardRowComponent = () => { fontSize: 16, fontStyle: 'normal', fontWeight: '500', - marginHorizontal: 10 + marginHorizontal: 10, }} > 200 LVL @@ -117,6 +127,9 @@ const BoardRowComponent = () => { { ); -} +}; const dummyScores = [ { - id: 1 + id: 1, }, { - id: 2 + id: 2, }, { - id: 3 + id: 3, }, { - id: 4 + id: 4, }, { - id: 5 + id: 5, }, { - id: 6 + id: 6, }, { - id: 7 + id: 7, }, { - id: 8 + id: 8, }, { - id: 9 + id: 9, }, -] +]; const Leaderboardiew = () => { + // const scoresQuery = useQuery(API.getTopTwentyPlayers()) return ( - + @@ -188,19 +205,19 @@ const Leaderboardiew = () => { alignItems: 'center', alignSelf: 'stretch', flexDirection: 'row', - marginBottom: 20 + marginBottom: 20, }} > - - - + + + {dummyScores.map((comp, index) => ( - + ))} ); -} +}; -export default Leaderboardiew; \ No newline at end of file +export default Leaderboardiew; diff --git a/front/views/PlayView.tsx b/front/views/PlayView.tsx index 535ab4e..84bc7d7 100644 --- a/front/views/PlayView.tsx +++ b/front/views/PlayView.tsx @@ -144,7 +144,7 @@ const PlayView = ({ songId, type, route }: RouteProps) => { type: 'end', }) ); - API.updateUserTotalScore(score); + API.updateUserTotalScore(score); }; const onMIDISuccess = (access: MIDIAccess) => {