-
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move interfaces to types file (#1246)
* Improv #1216 extract all typscript interfaces into common types file * Improv 1216 extract all typscript interfaces into common types file- lint review
- Loading branch information
1 parent
cdc1fba
commit 8a777e0
Showing
8 changed files
with
64 additions
and
64 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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,53 @@ | ||
import { MouseEventHandler } from "react"; | ||
import { NavLinkProps } from "react-router-dom"; | ||
|
||
export interface ButtonProps { | ||
text: string; | ||
isTransparent: boolean; | ||
size: string; | ||
handleClick: MouseEventHandler; | ||
} | ||
|
||
export interface ButtonLinkProps extends NavLinkProps { | ||
size?: string; | ||
} | ||
|
||
export interface QuizQuestion { | ||
message: string; | ||
points: number; | ||
chosenAnswer: string; | ||
correct: boolean; | ||
displayExplanation: string; | ||
showReference: string; | ||
nextQuestion: MouseEventHandler; | ||
show: boolean; | ||
} | ||
|
||
export interface QuizProps { | ||
currQuestion: { Question: string }; | ||
questionNumber: number; | ||
totalQuestions: number; | ||
modalProps: QuizQuestion; | ||
chooseAnswer: boolean; | ||
points: number; | ||
choicesArr: string[][]; | ||
selectedOption: string; | ||
selectOption: (option: string) => void; | ||
checkAnswer: () => void; | ||
} | ||
|
||
export interface PointTotals { | ||
points: number; | ||
totalQuestions: number; | ||
resetQuiz: () => void; | ||
} | ||
|
||
export interface SelectCategoryProps { | ||
selectQuiz: (category: string, index: number) => void; | ||
startRandomQuiz: () => void; | ||
} | ||
|
||
export interface SelectQuestionsTotalProps { | ||
startQuiz: (e: number) => void; | ||
totalQuestions: number; // Add the totalQuestions prop | ||
} |