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="theme-color" content="#000000"/>
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
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"/>
|
<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';
|
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}`, {
|
fetch(`${API}/challenge-my-submissions/${challengeName}`, {
|
||||||
headers: {'Authorization': `Bearer ${KeyCloakService.getToken()}`}
|
headers: { Authorization: `Bearer ${KeyCloakService.getToken()}` },
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then((response) => response.json())
|
||||||
.then(data => {
|
.then((data) => {
|
||||||
setDataOriginalState(data);
|
setDataOriginalState(data);
|
||||||
let item = {};
|
let item = {};
|
||||||
let result = [];
|
let result = [];
|
||||||
@ -18,19 +25,22 @@ const getMyEntries = (challengeName, setDataOriginalState, setDataStateForSearch
|
|||||||
...item,
|
...item,
|
||||||
evaluations: {
|
evaluations: {
|
||||||
...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) {
|
for (let test of tests) {
|
||||||
if (item.evaluations) {
|
if (item.evaluations) {
|
||||||
if (!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)) {
|
if (
|
||||||
|
!Object.hasOwn(item.evaluations, `${test.metric}.${test.name}`)
|
||||||
|
) {
|
||||||
item = {
|
item = {
|
||||||
...item,
|
...item,
|
||||||
evaluations: {
|
evaluations: {
|
||||||
...item.evaluations,
|
...item.evaluations,
|
||||||
[`${test.metric}.${test.name}`]: '-1'
|
[`${test.metric}.${test.name}`]: '-1',
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,29 +152,10 @@ const MyEntries = (props) => {
|
|||||||
const desktopRender = () => {
|
const desktopRender = () => {
|
||||||
return (
|
return (
|
||||||
<FlexColumn padding="24px" as="section" width="100%" maxWidth="1400px">
|
<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">
|
<FlexColumn padding="24px 12px" width="70%" as="section" id="start">
|
||||||
<H2 as="h2" margin="0 0 12px 0">
|
<H2 as="h2" margin="0 0 12px 0">
|
||||||
My Entries
|
My Entries
|
||||||
</H2>
|
</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>
|
</FlexColumn>
|
||||||
{myEntries && !loading ? (
|
{myEntries && !loading ? (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user