From 8cbdc17d33b9c6e37871c6145260f5c077f244f3 Mon Sep 17 00:00:00 2001 From: eb Date: Wed, 24 Feb 2021 13:11:09 +0800 Subject: [PATCH] fix(typo):correct some typos --- .vscode/settings.json | 12 +++++++++++- src/components/Donate/index.tsx | 2 +- src/components/Word/index.tsx | 2 +- .../{usePronouncation.ts => usePronunciation.ts} | 2 +- src/store/AppState.tsx | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) rename src/hooks/{usePronouncation.ts => usePronunciation.ts} (96%) diff --git a/.vscode/settings.json b/.vscode/settings.json index bdf3c505..e85feef7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,15 @@ }, "css.lint.unknownAtRules": "ignore", "css.validate": false, - "files.eol": "\n" + "files.eol": "\n", + "cSpell.words": [ + "alipay", + "esae", + "fontawesome", + "fortawesome", + "headlessui", + "ukphone", + "usphone", + "vercel" + ] } diff --git a/src/components/Donate/index.tsx b/src/components/Donate/index.tsx index 5abb0237..f6de37ee 100644 --- a/src/components/Donate/index.tsx +++ b/src/components/Donate/index.tsx @@ -16,7 +16,7 @@ const Donate: React.FC = ({ state, buttonOnclick, children }) => { enter="ease-out duration-30" enterFrom="opacity-0 " enterTo="opacity-100 " - leave="esae-in duration-200" + leave="ease-in duration-200" leaveFrom="opacity-100" leaveTo="opacity-0" > diff --git a/src/components/Word/index.tsx b/src/components/Word/index.tsx index 397c85ac..7b7316ca 100644 --- a/src/components/Word/index.tsx +++ b/src/components/Word/index.tsx @@ -3,7 +3,7 @@ import Letter, { LetterState } from './Letter' import { isLegal, isChineseSymbol } from '../../utils/utils' import useSounds from 'hooks/useSounds' import style from './index.module.css' -import usePronunciationSound from 'hooks/usePronouncation' +import usePronunciationSound from 'hooks/usePronunciation' const Word: React.FC = ({ word = 'defaultWord', onFinish, isStart, wordVisible = true }) => { word = word.replace(new RegExp(' ', 'g'), '_') diff --git a/src/hooks/usePronouncation.ts b/src/hooks/usePronunciation.ts similarity index 96% rename from src/hooks/usePronouncation.ts rename to src/hooks/usePronunciation.ts index 080b1f01..1e4642c1 100644 --- a/src/hooks/usePronouncation.ts +++ b/src/hooks/usePronunciation.ts @@ -17,7 +17,7 @@ export default function usePronunciationSound(word: string): PronounceFunction { useEffect(() => { audio?.play() return () => { - // Pause the audio when unmount + // Pause the audio when unMount audio?.pause() } }, [audio, word]) diff --git a/src/store/AppState.tsx b/src/store/AppState.tsx index 69d530cb..9e915131 100644 --- a/src/store/AppState.tsx +++ b/src/store/AppState.tsx @@ -11,7 +11,7 @@ export type AppState = { */ sound: boolean /** - * Avaiable dictionaries. + * Available dictionaries. * This field should not be written to `localStorage`. */ dictionaries: Dictionary[]