add info pannel
This commit is contained in:
@@ -36,6 +36,12 @@ const Missions = () => {
|
||||
(state) => state.store.articles.articleTagFilter,
|
||||
);
|
||||
|
||||
const calcDifficulty = (d: number) => {
|
||||
if (d <= 1200) return 'Easy';
|
||||
if (d <= 2000) return 'Medium';
|
||||
return 'Hard';
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(setMenuActivePage('missions'));
|
||||
dispatch(fetchMissions({ tags: tagsFilter }));
|
||||
@@ -83,7 +89,7 @@ const Missions = () => {
|
||||
id={v.id}
|
||||
authorId={v.authorId}
|
||||
name={v.name}
|
||||
difficulty={'Easy'}
|
||||
difficulty={calcDifficulty(v.difficulty)}
|
||||
tags={v.tags}
|
||||
timeLimit={1000}
|
||||
memoryLimit={256 * 1024 * 1024}
|
||||
|
||||
Reference in New Issue
Block a user