This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improved typing box code and fixed some bugs
- Loading branch information
Showing
4 changed files
with
270 additions
and
289 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
packages/web/src/components/common/typingBox/helpers/interfaces.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export interface typingBoxProps { | ||
mode: "easy" | "hard"; | ||
colorCodes: { | ||
wrong: string; | ||
correct: string; | ||
notTyped: string; | ||
}; | ||
} | ||
export interface typedArrayInterface { | ||
word: string; | ||
state: "correct" | "wrong"; | ||
time: number; | ||
wpm: number; | ||
accuracy: number; | ||
timeUsed: string; | ||
} | ||
|
||
export interface DataBoxType { | ||
data: Array<typingBoxProps>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.