From 59060c4d112d35d409f41f55055d9058f0416d31 Mon Sep 17 00:00:00 2001 From: roi Date: Sat, 18 May 2024 15:41:12 +0300 Subject: [PATCH] make ajustmets to lederboardAllTimes and change fonts --- app/[locale]/leaderboard/page.tsx | 18 ++++++++--- components/Leaderboard/LeaderBoardChart.tsx | 35 ++++++++++----------- components/Leaderboard/Monthly.tsx | 6 ++-- components/Leaderboard/Weekly.tsx | 2 +- public/locales/en.json | 2 +- 5 files changed, 36 insertions(+), 27 deletions(-) diff --git a/app/[locale]/leaderboard/page.tsx b/app/[locale]/leaderboard/page.tsx index 393d1ea..0b3a48f 100644 --- a/app/[locale]/leaderboard/page.tsx +++ b/app/[locale]/leaderboard/page.tsx @@ -1,3 +1,5 @@ + + import { Metadata } from 'next'; import { use } from 'react'; import { getData } from './getData'; @@ -6,7 +8,6 @@ import useTextDirection from '@/hooks/useTextDirection'; import Monthly from '@/components/Leaderboard/Monthly'; import Weekly from '@/components/Leaderboard/Weekly'; import LeaderBoardChart from '@/components/Leaderboard/LeaderBoardChart'; - export const metadata: Metadata = { title: 'לוח מובילים - Leaderboard', description: @@ -29,13 +30,14 @@ export const metadata: Metadata = { }; const LeaderboardPage: React.FC = () => { - const leaderboard = use(getData()); + const t = useTranslations('LeaderBoard'); const direction = useTextDirection(); return ( -
-
+
+
+

{ {t('MonthlyTitle')}{' '}

+ +
+

{ {t('WeeklyTitle')}{' '}

+ +
+

+ className="overflow-y-scroll h-2/3 w-5/6 flex flex-col gap-6 self-center p-2 font-inter text-base text-darkText dark:text-lightText "> {leaderBoardData.props.leaderboard.members.reverse().map((contributor, place) => { const pathDevelp = contributor; - return (
#{place + 1} @@ -29,29 +27,30 @@ export default function LeaderBoardChart() { />
{pathDevelp.name} - - commits: {pathDevelp.stats.commits} - - + + score: {pathDevelp.score} + +
+ + commits: {pathDevelp.stats.commits} + + + {pathDevelp.stats.additions}++ + + + {pathDevelp.stats.deletions}-- + +
- - commits: {pathDevelp.stats.commits} - - - {pathDevelp.stats.additions}++ - - - {pathDevelp.stats.deletions}-- -
); })} diff --git a/components/Leaderboard/Monthly.tsx b/components/Leaderboard/Monthly.tsx index b27df05..b5cc312 100644 --- a/components/Leaderboard/Monthly.tsx +++ b/components/Leaderboard/Monthly.tsx @@ -1,8 +1,10 @@ + import { getData } from '@/app/[locale]/leaderboard/getData'; import useTextDirection from '@/hooks/useTextDirection'; import { useTranslations } from 'next-intl'; import React from 'react'; import { use } from 'react'; + export default function Monthly() { const leaderBoardData = use(getData()); @@ -17,9 +19,9 @@ export default function Monthly() { return (