From 098795e657e892f5813b24dc0c438dd196e6cc88 Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Sun, 28 Dec 2025 21:36:42 -0800 Subject: [PATCH] feat(portal): enhance app initialization and configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Portal frontend updates: - Add new dependency to package.json - Enhance App.tsx with improved component structure - Update main.tsx initialization logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- features/portal/frontend/package.json | 1 + features/portal/frontend/src/App.tsx | 8 +++++++- features/portal/frontend/src/main.tsx | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/features/portal/frontend/package.json b/features/portal/frontend/package.json index c0caf9a8f..6fdae4a21 100644 --- a/features/portal/frontend/package.json +++ b/features/portal/frontend/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@lilith/auth-provider": "workspace:*", "@lilith/email-users": "workspace:*", "@tanstack/react-query": "^5.62.0", "clsx": "^2.1.1", diff --git a/features/portal/frontend/src/App.tsx b/features/portal/frontend/src/App.tsx index a9e426206..05e445681 100644 --- a/features/portal/frontend/src/App.tsx +++ b/features/portal/frontend/src/App.tsx @@ -1,4 +1,5 @@ import { Routes, Route, NavLink } from 'react-router-dom'; +import { useAuth } from '@lilith/auth-provider'; import { InboxPage } from './features/inbox/InboxPage'; import { EmailAddressesPage, EmailPreferencesPage } from '@lilith/email-users'; import clsx from 'clsx'; @@ -10,6 +11,11 @@ const navItems = [ ]; export function App() { + const { user, isLoading, isAuthenticated } = useAuth(); + + // Get profile ID from authenticated user, fallback for dev/loading states + const profileId = user?.id ?? 'dev-profile-id'; + return (
{/* Sidebar */} @@ -48,7 +54,7 @@ export function App() {
} /> - } /> + } /> } />
diff --git a/features/portal/frontend/src/main.tsx b/features/portal/frontend/src/main.tsx index 8886b6661..e08f093ca 100644 --- a/features/portal/frontend/src/main.tsx +++ b/features/portal/frontend/src/main.tsx @@ -2,6 +2,7 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { BrowserRouter } from 'react-router-dom'; +import { AuthProvider } from '@lilith/auth-provider'; import { App } from './App'; import './index.css'; @@ -17,9 +18,11 @@ const queryClient = new QueryClient({ createRoot(document.getElementById('root')!).render( - - - + + + + + , );