File size: 2,553 Bytes
ebdfd67
2a8ebbd
ebdfd67
2a8ebbd
ebdfd67
 
2a8ebbd
 
 
 
 
 
 
 
 
 
 
 
ebdfd67
 
 
 
 
2a8ebbd
ebdfd67
2a8ebbd
ebdfd67
2a8ebbd
ebdfd67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2a8ebbd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ebdfd67
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import React from "react";
import { Box, Typography, IconButton, Tooltip } from "@mui/material";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import ShareIcon from "@mui/icons-material/Share";

const ExternalLinks = () => {
  const handleShare = async () => {
    try {
      await navigator.share({
        title: "YourBench Demo",
        text: "Check out this benchmark evaluation on YourBench!",
        url: window.location.href,
      });
    } catch (err) {
      console.log("Error sharing:", err);
    }
  };

  return (
    <Box
      sx={{
        position: "fixed",
        top: 24,
        left: 24,
        right: 24,
        margin: "auto",
        display: "flex",
        justifyContent: "space-between",
        alignItems: "center",
        zIndex: 1000,
      }}
    >
      <Typography
        variant="body2"
        sx={{
          display: "flex",
          gap: 2,
          alignItems: "center",
        }}
      >
        <a
          href="https://github.com/huggingface/yourbench"
          target="_blank"
          rel="noopener noreferrer"
          style={{ textDecoration: "none", color: "inherit" }}
        >
          GitHub
          <OpenInNewIcon sx={{ fontSize: "0.75rem", ml: 0.5, opacity: 0.6 }} />
        </a>
        <Typography component="span" sx={{ opacity: 0.5 }}>

        </Typography>
        <a
          href="https://huggingface.co/datasets/sumuks/tempora"
          target="_blank"
          rel="noopener noreferrer"
          style={{ textDecoration: "none", color: "inherit" }}
        >
          Dataset
          <OpenInNewIcon sx={{ fontSize: "0.75rem", ml: 0.5, opacity: 0.6 }} />
        </a>
        <Typography component="span" sx={{ opacity: 0.5 }}>

        </Typography>
        <a
          href="https://github.com/huggingface/yourbench/tree/main/docs"
          target="_blank"
          rel="noopener noreferrer"
          style={{ textDecoration: "none", color: "inherit" }}
        >
          Documentation
          <OpenInNewIcon sx={{ fontSize: "0.75rem", ml: 0.5, opacity: 0.6 }} />
        </a>
      </Typography>
      <Tooltip title="Share">
        <IconButton
          onClick={handleShare}
          size="small"
          sx={{
            ml: 1,
            color: "inherit",
            opacity: 0.7,
            "&:hover": {
              opacity: 1,
            },
          }}
        >
          <ShareIcon fontSize="small" />
        </IconButton>
      </Tooltip>
    </Box>
  );
};

export default ExternalLinks;