fix(ts): refactor codebase for capacitor setup

This commit is contained in:
shafin-r
2025-07-28 20:22:04 +06:00
parent e091a78bdb
commit 0bca09f8ef
31 changed files with 458 additions and 384 deletions

15
types/auth.d.ts vendored
View File

@ -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
View File

@ -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
View File

@ -0,0 +1,4 @@
export interface GalleryViews {
id: number;
content: React.JSX.Element;
}