meta description and favicon update, correct error in MyEntries
This commit is contained in:
parent
02fd22b56f
commit
935a09abe9
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 15 KiB |
@ -7,7 +7,7 @@
|
||||
<meta name="theme-color" content="#000000"/>
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
content="A data challenge platform for machine learning research, competition, cooperation and reproducibility."
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png"/>
|
||||
<!--
|
||||
|
@ -1,12 +1,19 @@
|
||||
import {API} from '../utils/globals';
|
||||
import { API } from '../utils/globals';
|
||||
import KeyCloakService from '../services/KeyCloakService';
|
||||
|
||||
const getMyEntries = (challengeName, setDataOriginalState, setDataStateForSearch, setDataState, setLoadingState, setScoreSorted) => {
|
||||
const getMyEntries = (
|
||||
challengeName,
|
||||
setDataOriginalState,
|
||||
setDataStateForSearch,
|
||||
setDataState,
|
||||
setLoadingState,
|
||||
setScoreSorted
|
||||
) => {
|
||||
fetch(`${API}/challenge-my-submissions/${challengeName}`, {
|
||||
headers: {'Authorization': `Bearer ${KeyCloakService.getToken()}`}
|
||||
headers: { Authorization: `Bearer ${KeyCloakService.getToken()}` },
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
setDataOriginalState(data);
|
||||
let item = {};
|
||||
let result = [];
|
||||
@ -18,19 +25,22 @@ const getMyEntries = (challengeName, setDataOriginalState, setDataStateForSearch
|
||||
...item,
|
||||
evaluations: {
|
||||
...item.evaluations,
|
||||
[`${evaluation.test.metric}.${evaluation.test.name}`]: evaluation.score
|
||||
}
|
||||
[`${evaluation.test.metric}.${evaluation.test.name}`]:
|
||||
evaluation.score,
|
||||
},
|
||||
};
|
||||
}
|
||||
for (let test of tests) {
|
||||
if (item.evaluations) {
|
||||
if (!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)) {
|
||||
if (
|
||||
!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)
|
||||
) {
|
||||
item = {
|
||||
...item,
|
||||
evaluations: {
|
||||
...item.evaluations,
|
||||
[`${test.metric}.${test.name}`]: '-1'
|
||||
}
|
||||
[`${test.metric}.${test.name}`]: '-1',
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -152,29 +152,10 @@ const MyEntries = (props) => {
|
||||
const desktopRender = () => {
|
||||
return (
|
||||
<FlexColumn padding="24px" as="section" width="100%" maxWidth="1400px">
|
||||
<H2 as="h2" margin="0 0 32px 0">
|
||||
My entries
|
||||
</H2>{' '}
|
||||
<FlexColumn padding="24px 12px" width="70%" as="section" id="start">
|
||||
<H2 as="h2" margin="0 0 12px 0">
|
||||
My Entries
|
||||
</H2>
|
||||
{!loading ? (
|
||||
<>
|
||||
<Search searchQueryHandler={searchQueryHandler} />
|
||||
<Pager
|
||||
pageNr={pageNr}
|
||||
width="48px"
|
||||
borderRadius="64px"
|
||||
pages={CALC_PAGES(myEntries)}
|
||||
nextPage={nextPage}
|
||||
previousPage={previousPage}
|
||||
number={`${pageNr} / ${CALC_PAGES(myEntries)}`}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<Loading />
|
||||
)}
|
||||
</FlexColumn>
|
||||
{myEntries && !loading ? (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user