diff --git a/src/App.tsx b/src/App.tsx
index fcb80f4..12acb1d 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -9,9 +9,6 @@ import { ThemeProvider, PrivacyProvider, NotificationProvider, GuideProvider, us
* Wrapped by providers, uses hooks
*/
function AppContent() {
- // Enable automatic token refresh
- useAutoTokenRefresh();
-
return ;
}
diff --git a/src/components/common/Layout/Layout.tsx b/src/components/common/Layout/Layout.tsx
index a5bfbd9..9aca5d0 100644
--- a/src/components/common/Layout/Layout.tsx
+++ b/src/components/common/Layout/Layout.tsx
@@ -1,6 +1,6 @@
import { Outlet } from 'react-router-dom';
-import { useTheme } from '../../../hooks';
+import { useTheme, useAutoTokenRefresh } from '../../../hooks';
import { Icon } from '@iconify/react';
import Navigation from '../Navigation';
import { CommandPalette } from '../CommandPalette';
@@ -16,6 +16,9 @@ import './Layout.css';
function Layout() {
const { isZenMode, setZenMode } = useTheme();
+ // Enable automatic token refresh within the authenticated layout
+ useAutoTokenRefresh();
+
return (
{isZenMode && (
diff --git a/src/main.tsx b/src/main.tsx
index df655ea..56a7094 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -4,7 +4,5 @@ import './index.css';
import App from './App.tsx';
createRoot(document.getElementById('root')!).render(
-
-
-
+
);