Skip to content

Commit f394021

Browse files
added comments for understanding
1 parent 298b995 commit f394021

File tree

10 files changed

+10
-52
lines changed

10 files changed

+10
-52
lines changed

components/haptic-tab.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Haptic Tab Component
33
*
44
* Tab bar button with haptic feedback for both iOS and Android.
5-
* Requirements: 10.4, 10.5
65
*/
76

87
import { BottomTabBarButtonProps } from '@react-navigation/bottom-tabs';

contexts/theme.context.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Theme Context and Provider
33
*
44
* Provides centralized theme management with light/dark mode support.
5-
* Requirements: 10.4, 10.5
65
*/
76

87
import {

hooks/use-auth.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
/**
2-
* Re-export useAuth hook from auth context for convenience
3-
*/
41
export { useAuth } from '../contexts/auth.context';

hooks/use-events.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
/**
2-
* Re-export useEvents hook from contexts for convenience
3-
*/
41
export { useEvents } from '@/contexts/events.context';

hooks/use-role.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@ interface UseRoleResult {
2121

2222
/**
2323
* useRole hook - Check current user's role and permissions
24-
*
25-
* @returns Role information and helper functions
26-
*
27-
* @example
28-
* ```tsx
29-
* const { isAdmin, hasRole } = useRole();
30-
*
31-
* if (isAdmin) {
32-
* // Show admin features
33-
* }
34-
*
35-
* if (hasRole('admin')) {
36-
* // Alternative way to check
37-
* }
38-
* ```
3924
*/
4025
export function useRole(): UseRoleResult {
4126
const { user, loading } = useAuth();

hooks/use-theme.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* useTheme Hook
33
*
44
* Re-exports theme hooks from the theme context for convenient access.
5-
* Requirements: 10.4, 10.5
65
*/
76

87
export {

services/checkin.service.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ export class CheckInService {
1717
private static readonly EVENTS_COLLECTION = 'events';
1818
private static readonly USERS_COLLECTION = 'users';
1919

20-
/**
21-
* Validate QR code data using the decodeQRData utility
22-
* @param qrString - Raw QR code string data
23-
* @returns Validation result with decoded data or error
24-
*/
20+
2521
static validateQRData(qrString: string): QRValidationResult {
2622
return decodeQRData(qrString);
2723
}
@@ -30,11 +26,6 @@ export class CheckInService {
3026
* Check in a user to an event
3127
* Verifies RSVP status and adds user to checkedIn array
3228
* Uses arrayUnion for idempotent operations (no duplicates)
33-
*
34-
* @param userId - User ID from QR code
35-
* @param eventId - Event ID from QR code
36-
* @returns Check-in result with success status and message
37-
*
3829
*/
3930
static async checkInUser(userId: string, eventId: string): Promise<CheckInResult> {
4031
try {
@@ -110,9 +101,6 @@ export class CheckInService {
110101

111102
/**
112103
* Get check-in status for a user at an event
113-
* @param userId - User ID to check
114-
* @param eventId - Event ID to check
115-
* @returns True if user is checked in, false otherwise
116104
*/
117105
static async getCheckInStatus(userId: string, eventId: string): Promise<boolean> {
118106
try {
@@ -140,8 +128,8 @@ export class CheckInService {
140128

141129
/**
142130
* Get attendance data for an event
143-
* @param eventId - Event ID to get attendance for
144-
* @returns Attendance data including RSVP and check-in counts
131+
* eventId - Event ID to get attendance for
132+
* Attendance data including RSVP and check-in counts
145133
*/
146134
static async getEventAttendance(eventId: string): Promise<AttendanceData | null> {
147135
try {
@@ -181,8 +169,8 @@ export class CheckInService {
181169

182170
/**
183171
* Helper method to get user name from Firestore
184-
* @param userId - User ID to look up
185-
* @returns User name or null if not found
172+
* userId - User ID to look up
173+
* User name or null if not found
186174
*/
187175
private static async getUserName(userId: string): Promise<string | null> {
188176
try {
@@ -208,8 +196,8 @@ export class CheckInService {
208196
* Validate and check in a user from QR code data
209197
* Combines validation and check-in into a single operation
210198
*
211-
* @param qrString - Raw QR code string data
212-
* @returns Check-in result with success status and message
199+
* qrString - Raw QR code string data
200+
* Check-in result with success status and message
213201
*/
214202
static async validateAndCheckIn(qrString: string): Promise<CheckInResult> {
215203
// First validate the QR data

services/event.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ export class EventService {
186186
* Subscribe to real-time updates for all upcoming events
187187
* Returns an unsubscribe function
188188
*
189-
* @param callback - Called with events array when data changes
190-
* @param onError - Optional error callback for handling subscription errors
189+
* callback - Called with events array when data changes
190+
* onError - Optional error callback for handling subscription errors
191191
*/
192192
static subscribeToEvents(
193193
callback: (events: Event[]) => void,

services/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
* Export all services
3-
*/
41
export { AuthService } from './auth.service';
52
export { CheckInService } from './checkin.service';
63
export { EventService } from './event.service';

services/notification.service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class NotificationService {
8080
const tokenData = await Notifications.getExpoPushTokenAsync({ projectId });
8181
console.log('Expo Push Token:', tokenData.data);
8282

83-
// Also get the native device token (FCM for Android, APNs for iOS)
83+
// Also get the native device token (FCM for Android)
8484
// This can be used as a fallback or for direct FCM integration
8585
try {
8686
const deviceToken = await Notifications.getDevicePushTokenAsync();
@@ -332,7 +332,6 @@ export class NotificationService {
332332

333333
/**
334334
* Set up notification listeners for foreground notifications and tap handling
335-
* Requirements: 6.3, 6.4
336335
*/
337336
static setupNotificationListeners(): () => void {
338337
// Listener for notifications received while app is in foreground
@@ -366,7 +365,6 @@ export class NotificationService {
366365

367366
/**
368367
* Handle notification received in foreground
369-
* Requirements: 6.3
370368
*/
371369
private static handleNotificationReceived(
372370
notification: Notifications.Notification
@@ -378,7 +376,6 @@ export class NotificationService {
378376

379377
/**
380378
* Handle notification tap - deep link to event detail
381-
* Requirements: 6.4
382379
*/
383380
private static handleNotificationTap(
384381
response: Notifications.NotificationResponse

0 commit comments

Comments
 (0)