File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,15 +75,15 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
7575
7676 const unreadCount = useMemo ( ( ) => notifications . filter ( ( n ) => ! n . read ) . length , [ notifications ] ) ;
7777
78- const resetAuthState = ( ) => {
78+ const resetAuthState = useCallback ( ( ) => {
7979 setCurrentUser ( null ) ;
8080 setPartner ( null ) ;
8181 setUsers ( [ ] ) ;
8282 setAllNotifications ( [ ] ) ;
8383 cancelCloudWarmup ( ) ;
8484 clearFocusStatsCache ( ) ;
8585 clearPeriodTrackerCache ( ) ;
86- } ;
86+ } , [ ] ) ;
8787
8888 const refreshAuthData = useCallback ( async ( ) => {
8989 const token = getAuthToken ( ) ;
@@ -112,7 +112,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
112112 resetAuthState ( ) ;
113113 }
114114 }
115- } , [ ] ) ;
115+ } , [ resetAuthState ] ) ;
116116
117117 useEffect ( ( ) => {
118118 refreshAuthData ( ) ;
Original file line number Diff line number Diff line change @@ -167,15 +167,6 @@ const dedupeRecentDuplicateEvents = (items: AnniversaryEvent[]): AnniversaryEven
167167 return deduped ;
168168} ;
169169
170- const chunkItems = < T , > ( items : T [ ] , size : number ) : T [ ] [ ] => {
171- if ( size <= 0 ) return [ items ] ;
172- const chunks : T [ ] [ ] = [ ] ;
173- for ( let i = 0 ; i < items . length ; i += size ) {
174- chunks . push ( items . slice ( i , i + size ) ) ;
175- }
176- return chunks ;
177- } ;
178-
179170const estimatePayloadBytes = ( payload : unknown ) : number => {
180171 try {
181172 return new Blob ( [ JSON . stringify ( payload ) ] ) . size ;
@@ -686,8 +677,3 @@ export const calculateDateDiff = (targetDate: string): number => {
686677
687678
688679
689-
690-
691-
692-
693-
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export enum View {
1212export interface User {
1313 id : string ;
1414 email : string ;
15- passwordHash ?: string ; // Never store plain password in frontend
15+ // NOTE: passwordHash is intentionally excluded from frontend types — it only exists on the backend model.
1616 invitationCode : string ; // User's own unique invite code
1717 boundInvitationCode ?: string ; // Invite code from another account that user has bound
1818 emailVerified ?: boolean ;
Original file line number Diff line number Diff line change 11// AI Service for image analysis
2+ import { getNow } from './timeService' ;
3+
24export interface AIAnalysisResult {
35 location ?: string ;
46 date ?: string ;
@@ -95,8 +97,6 @@ export async function analyzeImage(imageBase64: string): Promise<AIAnalysisResul
9597 }
9698}
9799
98- import { getNow } from './timeService' ;
99-
100100/**
101101 * Mock analysis for testing (when no API key)
102102 * Accepts an optional fileDate to use instead of today's date
Original file line number Diff line number Diff line change @@ -16,10 +16,6 @@ export default defineConfig(({ mode }) => {
1616 } ,
1717 } ,
1818 plugins : [ react ( ) ] ,
19- define : {
20- 'process.env.API_KEY' : JSON . stringify ( env . GEMINI_API_KEY ) ,
21- 'process.env.GEMINI_API_KEY' : JSON . stringify ( env . GEMINI_API_KEY )
22- } ,
2319 resolve : {
2420 alias : {
2521 '@' : path . resolve ( __dirname , '.' ) ,
You can’t perform that action at this time.
0 commit comments