generated from muhtadeetaron/nextjs-template
fix(ts): refactor codebase for capacitor setup
This commit is contained in:
15
types/auth.d.ts
vendored
15
types/auth.d.ts
vendored
@ -6,3 +6,18 @@ export interface UserData {
|
||||
email: string;
|
||||
phone: string;
|
||||
}
|
||||
|
||||
export interface RegisterForm {
|
||||
name: string;
|
||||
institution: string;
|
||||
sscRoll: string;
|
||||
hscRoll: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface LoginForm {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
10
types/exam.d.ts
vendored
10
types/exam.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
export interface Question {
|
||||
id: string;
|
||||
text: string;
|
||||
question: string;
|
||||
options?: Record<string, string>;
|
||||
type: "multiple-choice" | "text" | "boolean" | undefined;
|
||||
correctAnswer: string | undefined;
|
||||
@ -18,7 +18,7 @@ export interface Exam {
|
||||
|
||||
export interface ExamAnswer {
|
||||
questionId: string;
|
||||
answer: any;
|
||||
answer: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ export interface ExamAttempt {
|
||||
answers: ExamAnswer[];
|
||||
startTime: Date;
|
||||
endTime?: Date;
|
||||
score?: number;
|
||||
score: number;
|
||||
passed?: boolean;
|
||||
apiResponse?: any;
|
||||
totalQuestions: number;
|
||||
@ -42,9 +42,9 @@ export interface ExamContextType {
|
||||
|
||||
// Actions
|
||||
setCurrentExam: (exam: Exam) => void;
|
||||
startExam: () => void;
|
||||
startExam: (exam?: Exam) => void;
|
||||
setAnswer: (questionId: string, answer: any) => void;
|
||||
submitExam: () => ExamAttempt;
|
||||
submitExam: () => ExamAttempt | null;
|
||||
clearExam: () => void;
|
||||
setApiResponse: (response: any) => void;
|
||||
|
||||
|
||||
4
types/gallery.d.ts
vendored
Normal file
4
types/gallery.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export interface GalleryViews {
|
||||
id: number;
|
||||
content: React.JSX.Element;
|
||||
}
|
||||
Reference in New Issue
Block a user