diff --git a/src/client/components/Layout.tsx b/src/client/components/Layout.tsx index 1d6c29b..f6a0bb7 100644 --- a/src/client/components/Layout.tsx +++ b/src/client/components/Layout.tsx @@ -4,12 +4,9 @@ import { TeamPresence } from './TeamPresence'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { Menu, X, FolderOpen, Layers, ClipboardCheck, LogOut, TrendingUp, Sun, Moon, HelpCircle, Shield, Wrench, Terminal, LayoutDashboard, Package, Thermometer } from 'lucide-react'; import { clsx } from 'clsx'; -import { useClerk, UserButton, useUser, OrganizationSwitcher, useOrganization } from '@clerk/clerk-react'; -import { TechnicalManual } from './TechnicalManual'; import { useAuth } from '../context/useAuth'; +import { TechnicalManual } from './TechnicalManual'; // import { useSystemSettings } from '../context/SystemSettingsContext'; -import { setApiOrgData } from '../services/api'; - interface LayoutProps { children: React.ReactNode; } @@ -22,22 +19,9 @@ export const Layout: React.FC = ({ children }) => { return saved === 'dark' || (!saved && window.matchMedia('(prefers-color-scheme: dark)').matches); }); const location = useLocation(); - const { signOut } = useClerk(); - const { user } = useUser(); - const { organization } = useOrganization(); - const { isAdmin, isUser, isDeveloper, appUser } = useAuth(); + const { isAdmin, isUser, isDeveloper, appUser, logout } = useAuth(); // const { settings } = useSystemSettings(); - // Sync Organization ID with API client - React.useEffect(() => { - if (organization?.id) { - - setApiOrgData(organization.id, organization.name); - } else { - setApiOrgData(null); - } - }, [organization]); - // Helper to get role display name const getRoleDisplay = () => { switch (appUser?.role) { @@ -118,44 +102,15 @@ export const Layout: React.FC = ({ children }) => {
- {isAdmin() ? ( - - ) : ( -
- {organization?.imageUrl ? ( - {organization.name} - ) : ( -
- {organization?.name?.substring(0, 2).toUpperCase()} -
- )} -
-

{organization?.name || 'Carregando...'}

-

Organização

-
+
+
+ ORG
- )} +
+

Organização Matriz

+

Conta

+
+
{/* Team Presence - Shows all members with online/offline status */} @@ -257,7 +212,7 @@ export const Layout: React.FC = ({ children }) => {