()
| 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 |
nothing calls this directly
no test coverage detected