mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
fix
This commit is contained in:
@@ -25,14 +25,7 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
||||
|
||||
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 (
|
||||
<div className="flex-1 bg-white rounded-lg p-6">
|
||||
@@ -45,7 +38,7 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
||||
remarkPlugins={[remarkMath, remarkGfm]}
|
||||
rehypePlugins={[rehypeKatex]}
|
||||
>
|
||||
{markdownText}
|
||||
{task.description}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -69,7 +69,9 @@ const CompetitionSession = () => {
|
||||
});
|
||||
|
||||
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 isLoading = tasksQuery.isLoading || competitionQuery.isLoading;
|
||||
const error = tasksQuery.error || competitionQuery.error
|
||||
|
||||
Reference in New Issue
Block a user