diff --git a/src/assets/baidu-fanyi.png b/src/assets/baidu-fanyi.png deleted file mode 100644 index 43d8a61..0000000 Binary files a/src/assets/baidu-fanyi.png and /dev/null differ diff --git a/src/assets/baidu.png b/src/assets/baidu.png deleted file mode 100644 index 3073ae7..0000000 Binary files a/src/assets/baidu.png and /dev/null differ diff --git a/src/assets/google-translate.svg b/src/assets/google-translate.svg deleted file mode 100644 index ecf59ae..0000000 --- a/src/assets/google-translate.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/assets/google.svg b/src/assets/google.svg deleted file mode 100644 index 10c132a..0000000 --- a/src/assets/google.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/components/error-list.tsx b/src/components/error-list.tsx deleted file mode 100644 index 67f01bf..0000000 --- a/src/components/error-list.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import useCreation from 'ahooks/es/useCreation'; -import { FC } from 'react'; - -interface Predicate { - condition?: boolean; - message?: string; -} - -export const ErrorList: FC<{ predicates: Predicate[] /** const */ }> = ({ - predicates, -}) => { - const errors = useCreation( - () => - predicates - .filter(({ condition }) => condition) - - .map(({ message }, index) =>
  • {message}
  • ), - [], - ); - if (!errors.length) { - return null; - } - return ( - - ); -}; diff --git a/src/hooks/use-global-style.ts b/src/hooks/use-global-style.ts deleted file mode 100644 index e691e0c..0000000 --- a/src/hooks/use-global-style.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { APP_CONTAINER_ID } from '@/utils/const'; -import useCreation from 'ahooks/es/useCreation'; -import { useEffect } from 'react'; - -export const useGlobalStyle = (style: string) => { - const node = useCreation(() => { - const el = document.createElement('style'); - document - .getElementById(APP_CONTAINER_ID) - ?.insertAdjacentElement('beforebegin', el); - return el; - }, []); - useEffect(() => { - node.innerHTML = style; - }, [style]); -};