fix evaluation link
Browse files
frontend/src/components/ExternalLinks.jsx
CHANGED
|
@@ -11,13 +11,9 @@ import {
|
|
| 11 |
} from "@mui/material";
|
| 12 |
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
| 13 |
import ShareIcon from "@mui/icons-material/Share";
|
| 14 |
-
import DarkModeOutlinedIcon from "@mui/icons-material/DarkModeOutlined";
|
| 15 |
-
import LightModeOutlinedIcon from "@mui/icons-material/LightModeOutlined";
|
| 16 |
import MenuIcon from "@mui/icons-material/Menu";
|
| 17 |
-
import { useThemeMode } from "../hooks/useThemeMode";
|
| 18 |
|
| 19 |
const ExternalLinks = () => {
|
| 20 |
-
const { mode, toggleTheme } = useThemeMode();
|
| 21 |
const [anchorEl, setAnchorEl] = useState(null);
|
| 22 |
const theme = useTheme();
|
| 23 |
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
|
|
@@ -182,26 +178,6 @@ const ExternalLinks = () => {
|
|
| 182 |
<ShareIcon fontSize="small" />
|
| 183 |
</IconButton>
|
| 184 |
</Tooltip>
|
| 185 |
-
<Tooltip title={mode === "light" ? "Mode sombre" : "Mode clair"}>
|
| 186 |
-
<IconButton
|
| 187 |
-
onClick={toggleTheme}
|
| 188 |
-
size="small"
|
| 189 |
-
sx={{
|
| 190 |
-
ml: 1,
|
| 191 |
-
color: "inherit",
|
| 192 |
-
opacity: 0.7,
|
| 193 |
-
"&:hover": {
|
| 194 |
-
opacity: 1,
|
| 195 |
-
},
|
| 196 |
-
}}
|
| 197 |
-
>
|
| 198 |
-
{mode === "light" ? (
|
| 199 |
-
<DarkModeOutlinedIcon fontSize="small" />
|
| 200 |
-
) : (
|
| 201 |
-
<LightModeOutlinedIcon fontSize="small" />
|
| 202 |
-
)}
|
| 203 |
-
</IconButton>
|
| 204 |
-
</Tooltip>
|
| 205 |
</Box>
|
| 206 |
</Box>
|
| 207 |
);
|
|
|
|
| 11 |
} from "@mui/material";
|
| 12 |
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
| 13 |
import ShareIcon from "@mui/icons-material/Share";
|
|
|
|
|
|
|
| 14 |
import MenuIcon from "@mui/icons-material/Menu";
|
|
|
|
| 15 |
|
| 16 |
const ExternalLinks = () => {
|
|
|
|
| 17 |
const [anchorEl, setAnchorEl] = useState(null);
|
| 18 |
const theme = useTheme();
|
| 19 |
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
|
|
|
|
| 178 |
<ShareIcon fontSize="small" />
|
| 179 |
</IconButton>
|
| 180 |
</Tooltip>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
</Box>
|
| 182 |
</Box>
|
| 183 |
);
|
frontend/src/pages/BenchmarkEvaluationPage.jsx
CHANGED
|
@@ -3,6 +3,7 @@ import { Box, CircularProgress } from "@mui/material";
|
|
| 3 |
import { useNavigate, useSearchParams, Navigate } from "react-router-dom";
|
| 4 |
import Intro from "../components/Intro";
|
| 5 |
import BenchmarkEvaluation from "../components/BenchmarkEvaluation";
|
|
|
|
| 6 |
|
| 7 |
function BenchmarkEvaluationPage() {
|
| 8 |
const navigate = useNavigate();
|
|
@@ -31,7 +32,7 @@ function BenchmarkEvaluationPage() {
|
|
| 31 |
const checkSession = async () => {
|
| 32 |
try {
|
| 33 |
const response = await fetch(
|
| 34 |
-
|
| 35 |
);
|
| 36 |
|
| 37 |
if (!response.ok) {
|
|
|
|
| 3 |
import { useNavigate, useSearchParams, Navigate } from "react-router-dom";
|
| 4 |
import Intro from "../components/Intro";
|
| 5 |
import BenchmarkEvaluation from "../components/BenchmarkEvaluation";
|
| 6 |
+
import API_CONFIG from "../config/api";
|
| 7 |
|
| 8 |
function BenchmarkEvaluationPage() {
|
| 9 |
const navigate = useNavigate();
|
|
|
|
| 32 |
const checkSession = async () => {
|
| 33 |
try {
|
| 34 |
const response = await fetch(
|
| 35 |
+
`${API_CONFIG.BASE_URL}/benchmark-questions/${sessionId}`
|
| 36 |
);
|
| 37 |
|
| 38 |
if (!response.ok) {
|