Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

add githubId & registeredWithGithub

Blue Moused8d814a3099a
diff --git a/src/pages/UserSettings/components/Socialisations.tsx b/src/pages/UserSettings/components/Socialisations.tsx
index c11489c0d..deffc624c 100644
--- a/src/pages/UserSettings/components/Socialisations.tsx
+++ b/src/pages/UserSettings/components/Socialisations.tsx
@@ -44,6 +44,12 @@ const getStatusByUser = (user: IUser, socialisation: string) => {
return [connected, unlinkable]
}
+ if (socialisation === SSO_PROVIDERS.GITHUB) {
+ const connected = user.githubId
+ const unlinkable = !user.registeredWithGithub
+ return [connected, unlinkable]
+ }
+
return [false, false]
}
diff --git a/src/redux/models/IUser.ts b/src/redux/models/IUser.ts
index 0a282d36c..e0b7dbee7 100644
--- a/src/redux/models/IUser.ts
+++ b/src/redux/models/IUser.ts
@@ -31,4 +31,6 @@ export interface IUser {
sharedProjects: ISharedProject[]
registeredWithGoogle: boolean
googleId: string | null
+ githubId: number | null
+ registeredWithGithub: boolean
}