Skip to content

Commit 21bfcfc

Browse files
quick fix
1 parent 90847e7 commit 21bfcfc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/components/settings/connections/ConnectionsTab.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import { toast } from 'react-toastify';
33
import Cookies from 'js-cookie';
44
import { logStore } from '~/lib/stores/logs';
55

6+
interface GitHubUserResponse {
7+
login: string;
8+
id: number;
9+
[key: string]: any; // for other properties we don't explicitly need
10+
}
11+
612
export default function ConnectionsTab() {
713
const [githubUsername, setGithubUsername] = useState(Cookies.get('githubUsername') || '');
814
const [githubToken, setGithubToken] = useState(Cookies.get('githubToken') || '');
@@ -26,7 +32,7 @@ export default function ConnectionsTab() {
2632
});
2733

2834
if (response.ok) {
29-
const data = await response.json();
35+
const data = (await response.json()) as GitHubUserResponse;
3036
if (data.login === githubUsername) {
3137
setIsConnected(true);
3238
return true;

0 commit comments

Comments
 (0)