Add mongo forward read. Fix markdown code block. (#2174)

* perf: read from mongo forward node

* fix: code block ui

* perf: markdown code css
This commit is contained in:
Archer
2024-07-29 09:47:30 +08:00
committed by GitHub
parent 0a9a7691b4
commit 23f22cda18
10 changed files with 191 additions and 118 deletions

View File

@@ -287,18 +287,18 @@ const codeLight: { [key: string]: React.CSSProperties } = {
const CodeLight = ({
children,
className,
inline,
codeBlock,
match
}: {
children: React.ReactNode & React.ReactNode[];
className?: string;
inline?: boolean;
codeBlock?: boolean;
match: RegExpExecArray | null;
}) => {
const { t } = useTranslation();
const { copyData } = useCopyData();
if (!inline) {
if (codeBlock) {
const codeBoxName = useMemo(() => {
const input = match?.['input'] || '';
if (!input) return match?.[1];
@@ -312,7 +312,6 @@ const CodeLight = ({
my={3}
borderRadius={'md'}
overflow={'overlay'}
bg={'myGray.900'}
boxShadow={
'0px 0px 1px 0px rgba(19, 51, 107, 0.08), 0px 1px 2px 0px rgba(19, 51, 107, 0.05)'
}