From 1e66000ff155b13f7c5a3b1fc77726b4297c484a Mon Sep 17 00:00:00 2001 From: Kaiyi Date: Sat, 19 Aug 2023 02:35:36 +0800 Subject: [PATCH] feat: add recite to error book (#587) --- .eslintrc.cjs | 1 + package.json | 1 + src/components/Header/index.tsx | 2 +- src/index.css | 2 +- src/pages/ErrorBook/ErrorRow.tsx | 19 +++- src/pages/ErrorBook/LoadingWordUI.tsx | 23 +++++ src/pages/ErrorBook/Pagination.tsx | 5 +- src/pages/ErrorBook/RowDetail/DataTag.tsx | 25 +++++ .../ErrorBook/RowDetail/RowPagination.tsx | 83 ++++++++++++++++ src/pages/ErrorBook/RowDetail/index.tsx | 96 +++++++++++++++++++ src/pages/ErrorBook/hooks/useGetWord.ts | 19 +++- src/pages/ErrorBook/index.tsx | 70 ++++++++------ src/pages/ErrorBook/store/index.ts | 4 + src/pages/ErrorBook/type.ts | 4 +- .../Typing/components/ResultScreen/index.tsx | 4 +- src/pages/Typing/components/Speed/index.tsx | 2 +- .../WordPanel/components/Phonetic/index.tsx | 4 +- tailwind.config.js | 20 +++- yarn.lock | 68 ++++++++++++- 19 files changed, 402 insertions(+), 50 deletions(-) create mode 100644 src/pages/ErrorBook/LoadingWordUI.tsx create mode 100644 src/pages/ErrorBook/RowDetail/DataTag.tsx create mode 100644 src/pages/ErrorBook/RowDetail/RowPagination.tsx create mode 100644 src/pages/ErrorBook/RowDetail/index.tsx create mode 100644 src/pages/ErrorBook/store/index.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5119b905..5c7d7fcc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -52,5 +52,6 @@ module.exports = { rules: { 'sort-imports': ['error', { ignoreDeclarationSort: true }], '@typescript-eslint/consistent-type-imports': 1, + 'react/prop-types': 'off', }, } diff --git a/package.json b/package.json index 66bc00f5..7e4e8b27 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@radix-ui/react-slider": "^1.1.1", "canvas-confetti": "^1.6.0", "classnames": "^2.3.2", + "daisyui": "^3.5.1", "dayjs": "^1.11.8", "dexie": "^3.2.3", "dexie-export-import": "^4.0.7", diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 3348a92c..6082c96d 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -14,7 +14,7 @@ const Header: React.FC = ({ children }) => { Qwerty Learner Logo

Qwerty Learner

-