get possible metrics and mobile resolution hotfix

This commit is contained in:
mattyl006 2022-12-14 16:01:32 +01:00
parent 818c841d2b
commit 3258aa2fd5
4 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,6 @@ const getUser = (setDataState, setLoadingState) => {
})
.then(response => response.json())
.then(data => {
console.log(data);
setDataState(data);
if (setLoadingState)
setLoadingState(false);

View File

@ -64,8 +64,9 @@ const Leaderboard = (props) => {
for (let entry of entriesFromApi) {
for (let evaluation of entry.evaluations) {
let metric = evaluation.test.metric;
if (metric && !metrics.includes(metric)) {
metrics.push(metric);
let name = evaluation.test.name;
if (metric && !metrics.includes(`${metric}.${name}`)) {
metrics.push(`${metric}.${name}`);
}
}
}

View File

@ -71,7 +71,7 @@ const EVALUATIONS_FORMAT = (evaluate) => {
};
const IS_MOBILE = () => {
return document.body.clientWidth <= 768;
return document.body.clientWidth <= 1024;
};
export {

View File

@ -2,9 +2,9 @@ import colors from './colors';
const theme = {
colors,
overMobile: '768px',
mobile: '(max-width: 768px)',
desktop: '(min-width: 769px)',
overMobile: '1024px',
mobile: '(max-width: 1024px)',
desktop: '(min-width: 1025px)',
shadow: '1px 2px 4px rgba(52, 52, 52, 0.25)',
authHeaderShadow: '1px -2px 4px rgba(52, 52, 52, 0.25)',
navShadow: '0 1px 2px rgba(52, 52, 52, 0.25)',