File size: 1,676 Bytes
e7abd9e
 
 
 
7b6b120
 
b4e647f
e7abd9e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40a9a5d
e7abd9e
 
 
40a9a5d
e7abd9e
40a9a5d
b4e647f
40a9a5d
 
 
 
 
 
 
e7abd9e
 
 
 
 
 
b4e647f
 
 
 
 
 
 
e7abd9e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { useEffect } from "react";
import Leaderboard from "./components/Leaderboard/Leaderboard";
import { Box } from "@mui/material";
import PageHeader from "../../components/shared/PageHeader";
import { useLeaderboardData } from "./components/Leaderboard/hooks/useLeaderboardData";
import { useLeaderboard } from "./components/Leaderboard/context/LeaderboardContext";
import { declareComponentKeys } from "i18nifty";

function LeaderboardPage() {
  const { data, isLoading, error } = useLeaderboardData();
  const { actions } = useLeaderboard();

  useEffect(() => {
    if (data) {
      actions.setModels(data);
    }
    actions.setLoading(isLoading);
    actions.setError(error);
  }, [data, isLoading, error, actions]);

  return (
    <Box
      sx={{
        width: "100%",
        ph: 2,
        display: "flex",
        flexDirection: "column",
      }}
    >
      {/* <Box
        sx={{ display: "flex", justifyContent: "center", pt: 6, mb: -4, pb: 0 }}
      >
        <Logo height="80px" />
      </Box> */}
      <PageHeader
        title="Leaderboard"
        subtitle={""}
        // subtitle={
        //   <>
        //     Comparer les grands modèles de langages {" "}
        //     <span style={{ fontWeight: 600 }}>ouverts</span> sur des problèmes{" "}
        //     <span style={{ fontWeight: 600 }}>francophones</span>
        //   </>
        // }
      />
      <Leaderboard />
    </Box>
  );
}

const { i18n } = declareComponentKeys<
| { K: "greating"; P: { who: string; } }
| "how are you"
| { K: "learn more"; P: { href: string; }; R: JSX.Element }
>()({ LeaderboardPage });
export type I18n = typeof i18n;

export default LeaderboardPage;