upgrade react 19, remove preact usage

This commit is contained in:
2024-12-27 15:43:48 +08:00
parent 4b36debd0b
commit 48ead03629
14 changed files with 43 additions and 43 deletions

View File

@@ -1,6 +1,6 @@
import { XMarkIcon } from "@heroicons/react/24/outline";
import Markdown from "react-markdown";
import { useState, useEffect, StateUpdater } from "preact/hooks";
import { useState } from "react";
import { Tr, langCodeContext, LANG_OPTIONS } from "@/translate";
import { ChatStore, ChatStoreMessage } from "@/types/chatstore";
@@ -156,7 +156,9 @@ export default function Message(props: Props) {
) : chat.role === "tool" ? (
<MessageToolResp chat={chat} copyToClipboard={copyToClipboard} />
) : renderMarkdown ? (
<Markdown>{getMessageText(chat)}</Markdown>
// [TODO] It is happening https://github.com/remarkjs/react-markdown/pull/879
// <Markdown>{getMessageText(chat)}</Markdown>
<></>
) : (
<div className="message-content">
{chat.content &&