mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 01:37:11 +00:00
fix
This commit is contained in:
@@ -25,14 +25,7 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
|||||||
|
|
||||||
const attachments = attachmentsQuery.data || [];
|
const attachments = attachmentsQuery.data || [];
|
||||||
|
|
||||||
const convertToMarkdown = (text: string): string => {
|
|
||||||
if (!text) return '';
|
|
||||||
|
|
||||||
let markdown = text.replace(/\n/g, '\n\n');
|
|
||||||
return markdown;
|
|
||||||
};
|
|
||||||
|
|
||||||
const markdownText = convertToMarkdown(task.description);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex-1 bg-white rounded-lg p-6">
|
<div className="flex-1 bg-white rounded-lg p-6">
|
||||||
@@ -45,7 +38,7 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
|||||||
remarkPlugins={[remarkMath, remarkGfm]}
|
remarkPlugins={[remarkMath, remarkGfm]}
|
||||||
rehypePlugins={[rehypeKatex]}
|
rehypePlugins={[rehypeKatex]}
|
||||||
>
|
>
|
||||||
{markdownText}
|
{task.description}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ const CompetitionSession = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const competition = competitionQuery.data;
|
const competition = competitionQuery.data;
|
||||||
const tasks = tasksQuery.data || [];
|
const tasks = [...(tasksQuery.data || [])].sort((a, b) => {
|
||||||
|
return a.in_competition_position - b.in_competition_position;
|
||||||
|
});
|
||||||
const results = resultsQuery.data || [];
|
const results = resultsQuery.data || [];
|
||||||
const isLoading = tasksQuery.isLoading || competitionQuery.isLoading;
|
const isLoading = tasksQuery.isLoading || competitionQuery.isLoading;
|
||||||
const error = tasksQuery.error || competitionQuery.error
|
const error = tasksQuery.error || competitionQuery.error
|
||||||
|
|||||||
Reference in New Issue
Block a user