MCPcopy Create free account
hub / github.com/code100x/cms / handleUnlinkAccount

Function handleUnlinkAccount

src/components/GitHubLinkButton.tsx:34–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 };
33
34 const handleUnlinkAccount = async () => {
35 setIsProcessing(true);
36 const response = await fetch('/api/github/details', {
37 method: 'DELETE',
38 });
39 setIsProcessing(false);
40 const resp = await response.json();
41 console.log(resp);
42 if (resp.success) {
43 toast.success(resp.message);
44 getGithubData();
45 } else {
46 toast.error(resp.message);
47 }
48 };
49
50 useEffect(() => {
51 // fetch the saved github linked data

Callers

nothing calls this directly

Calls 1

getGithubDataFunction · 0.85

Tested by

no test coverage detected