MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / fetchInvitation

Function fetchInvitation

web/src/app/invites/[token]/page.tsx:42–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 }, [token])
41
42 const fetchInvitation = async () => {
43 try {
44 const response = await fetch(`/api/invites/${token}`)
45 const data = await response.json()
46
47 if (!response.ok) {
48 setError(data.error || 'Failed to load invitation')
49 return
50 }
51
52 setInvitation(data.invitation)
53 } catch (error) {
54 setError('Failed to load invitation')
55 } finally {
56 setLoading(false)
57 }
58 }
59
60 const acceptInvitation = async () => {
61 if (!session) {

Callers 1

InvitationPageFunction · 0.85

Calls 2

setErrorFunction · 0.85
fetchFunction · 0.50

Tested by

no test coverage detected