fix: P0 stabilisation — score modifiers, logout cache clear, provider isolation, mutation error feedback
- scoreCalculator: apply dataQuality/confidence modifiers to finalScore (were computed but hardcoded to 0) - authService: call queryClient.clear() on logout to prevent cross-session data leakage - queryClient: extract to src/lib/queryClient.ts singleton so services can access it without circular imports - matchSyncService: new service layer owns match-generation logic; MockupNeedProvider no longer imports other providers directly - hooks (11 files): add onError + German toast feedback to every useMutation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { futureSignalService } from '../services/futureSignalService'
|
||||
import type { ReviewStatus } from '../domain/enums'
|
||||
import { STALE_SIGNALS } from '../lib/constants'
|
||||
import { useToastStore } from '../stores/toastStore'
|
||||
|
||||
export function useFutureSignals() {
|
||||
return useQuery({
|
||||
@@ -39,6 +40,9 @@ export function useVerifySignal() {
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['futureSignals'] })
|
||||
},
|
||||
onError: () => {
|
||||
useToastStore.getState().showToast('Signal konnte nicht verifiziert werden.', 'error')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,5 +55,8 @@ export function useUpdateSignalReviewStatus() {
|
||||
queryClient.invalidateQueries({ queryKey: ['futureSignals'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['futureSignal'] })
|
||||
},
|
||||
onError: () => {
|
||||
useToastStore.getState().showToast('Status konnte nicht aktualisiert werden.', 'error')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user