Optimize the project structure and introduce DDD design (#394)

This commit is contained in:
Archer
2023-10-12 17:46:37 +08:00
committed by GitHub
parent 76ac5238b6
commit ad7a17bf40
193 changed files with 1169 additions and 1084 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { Box, Flex, useColorModeValue } from '@chakra-ui/react';
import Icon from '@/components/Icon';
import { useCopyData } from '@/hooks/useCopyData';
import { useCopyData } from '@/web/common/hooks/useCopyData';
const codeLight: { [key: string]: React.CSSProperties } = {
'code[class*=language-]': {

View File

@@ -5,7 +5,7 @@ import RemarkGfm from 'remark-gfm';
import RemarkMath from 'remark-math';
import RehypeKatex from 'rehype-katex';
import RemarkBreaks from 'remark-breaks';
import { event } from '@/utils/plugin/eventbus';
import { eventBus } from '@/web/common/utils/eventbus';
import 'katex/dist/katex.min.css';
import styles from '../index.module.scss';
@@ -27,7 +27,7 @@ function MyLink(e: any) {
textDecoration={'underline'}
cursor={'pointer'}
onClick={() => {
event.emit('guideClick', { text });
eventBus.emit('guideClick', { text });
}}
>
{text}

View File

@@ -1,7 +1,7 @@
import React, { useMemo } from 'react';
import { Box, useTheme } from '@chakra-ui/react';
import { getFileAndOpen } from '@/utils/web/file';
import { useToast } from '@/hooks/useToast';
import { getFileAndOpen } from '@/web/common/utils/file';
import { useToast } from '@/web/common/hooks/useToast';
import { getErrText } from '@/utils/tools';
type QuoteItemType = {