mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
fix markdown?
This commit is contained in:
@@ -25,6 +25,15 @@ 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">
|
||||
<h2 className="text-3xl font-semibold mb-6 font-hse-sans">
|
||||
@@ -36,7 +45,7 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
||||
remarkPlugins={[remarkMath, remarkGfm]}
|
||||
rehypePlugins={[rehypeKatex]}
|
||||
>
|
||||
{task.description}
|
||||
{markdownText}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { create } from "zustand";
|
||||
import { User } from "../types/user";
|
||||
import { getCurrentUser } from "../api/user";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
interface UserState {
|
||||
user: User | null;
|
||||
@@ -22,6 +23,12 @@ const useUserStore = create<UserState>((set) => ({
|
||||
|
||||
clearUser: () => {
|
||||
set({ user: null });
|
||||
|
||||
const cookies = Cookies.get();
|
||||
Object.keys(cookies).forEach(cookieName => {
|
||||
Cookies.remove(cookieName, { path: '/' });
|
||||
Cookies.remove(cookieName);
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user