Improve profile menu to implement user identity connected URL (#2055)

#  Improve profile menu to implement user identity connected URL

- Create URL and get user identity
- Check if user is connected or show connexion button
- Improve profile to check before user data and don't display error webpage in menu
This commit is contained in:
grégoire parant
2022-04-14 10:17:59 +02:00
committed by GitHub
parent a3fd891530
commit a13c7e9e2f
7 changed files with 116 additions and 18 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ class AnalyticsClient {
constructor() {
if (POSTHOG_API_KEY && POSTHOG_URL) {
this.posthogPromise = import("posthog-js").then(({ default: posthog }) => {
posthog.init(POSTHOG_API_KEY, { api_host: POSTHOG_URL, disable_cookie: true });
posthog.init(POSTHOG_API_KEY, { api_host: POSTHOG_URL });
//the posthog toolbar need a reference in window to be able to work
window.posthog = posthog;
return posthog;