This commit is contained in:
rngsurrounded
2025-03-04 05:32:29 +09:00
parent 9e5db3d329
commit 94672a6fdb
2 changed files with 4 additions and 9 deletions
@@ -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