MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / loadDiffData

Function loadDiffData

source code/hooks/useDiffData.ts:47–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 let cancelled = false
46
47 async function loadDiffData() {
48 try {
49 // Fetch both stats and hunks
50 const [statsResult, hunksResult] = await Promise.all([
51 fetchGitDiff(),
52 fetchGitDiffHunks(),
53 ])
54
55 if (!cancelled) {
56 setDiffResult(statsResult)
57 setHunks(hunksResult)
58 setLoading(false)
59 }
60 } catch (_error) {
61 if (!cancelled) {
62 setDiffResult(null)
63 setHunks(new Map())
64 setLoading(false)
65 }
66 }
67 }
68
69 void loadDiffData()
70

Callers 1

useDiffDataFunction · 0.70

Calls 2

fetchGitDiffFunction · 0.85
fetchGitDiffHunksFunction · 0.85

Tested by

no test coverage detected