Skip to content

Commit

Permalink
Move Posthog back to theme
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjdominguez committed May 22, 2024
1 parent 2dd6f63 commit da6ae34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import posthog from 'posthog-js';

// 🦔 config
Expand Down
2 changes: 2 additions & 0 deletions src/theme/DocRoot/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import DocRootLayoutMain from '@theme/DocRoot/Layout/Main';
import styles from './styles.module.css';
import BrowserOnly from '@docusaurus/BrowserOnly';
import { AiChatBot } from '@site/src/components/AiChatBot/AiChatBot';
import UserFetcher from '@theme/DocRoot/Layout/Posthog';

export default function DocRootLayout({ children }) {
const sidebar = useDocsSidebar();
Expand All @@ -14,6 +15,7 @@ export default function DocRootLayout({ children }) {
return (
<div className={styles.docsWrapper}>
<BackToTopButton />
<UserFetcher />
<div className={styles.docRoot}>
{sidebar && (
<DocRootLayoutSidebar
Expand Down
2 changes: 0 additions & 2 deletions src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';
import NavbarLayout from '@theme/Navbar/Layout';
import NavbarContent from '@theme/Navbar/Content';
import UserFetcher from '@theme/Navbar/Posthog';
export default function Navbar() {
return (
<NavbarLayout>
<UserFetcher />
<NavbarContent />
</NavbarLayout>
);
Expand Down

0 comments on commit da6ae34

Please sign in to comment.