feat: add expo mobile application source code

This commit is contained in:
2026-05-21 16:06:35 +07:00
parent 76d7a5c5c6
commit 0c65a7811b
77 changed files with 20356 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { ApiService } from '../services/api';
class Logger {
private logs: string[] = [];
private maxLogs = 50;
log(message: string, type: 'info' | 'error' | 'sync' | 'success' = 'info') {
const timestamp = new Date().toLocaleTimeString();
const entry = `[${timestamp}] [${type.toUpperCase()}] ${message}`;
this.logs.unshift(entry);
if (this.logs.length > this.maxLogs) {
this.logs.pop();
}
if (type === 'error') {
ApiService.reportError(message, 'error').catch(() => {});
}
if (__DEV__) {
console.log(entry);
}
}
getLogs() {
return this.logs;
}
clear() {
this.logs = [];
}
}
export const DebugLogger = new Logger();