Skip to content

Commit

Permalink
Test without Posthog
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjdominguez committed May 22, 2024
1 parent 7362187 commit 7da7b7e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ import React, { useEffect } from 'react';
import NavbarLayout from '@theme/Navbar/Layout';
import NavbarContent from '@theme/Navbar/Content';
import fetchUser from '@theme/Navbar/FetchUser';
import posthog from 'posthog-js';
// import posthog from 'posthog-js';

// 🦔 config
posthog.init('phc_MZpdcQLGf57lyfOUT0XA93R3jaCxGsqftVt4iI4MyUY', {
api_host: 'https://analytics-posthog.hasura-app.io',
});
// // 🦔 config
// posthog.init('phc_MZpdcQLGf57lyfOUT0XA93R3jaCxGsqftVt4iI4MyUY', {
// api_host: 'https://analytics-posthog.hasura-app.io',
// });

export default function Navbar() {
useEffect(() => {
const getUser = async () => {
try {
const user = await fetchUser();
console.log('User fetched:', user);
posthog.identify(user.data.users[0]?.id, { email: user.data.users[0]?.email });
// posthog.identify(user.data.users[0]?.id, { email: user.data.users[0]?.email });
} catch (error) {
console.error('Error fetching user:', error);
}
Expand Down

0 comments on commit 7da7b7e

Please sign in to comment.