diff --git a/client/src/contexts/SoeMotorContext.tsx b/client/src/contexts/SoeMotorContext.tsx index 996a6ce..52d06f4 100644 --- a/client/src/contexts/SoeMotorContext.tsx +++ b/client/src/contexts/SoeMotorContext.tsx @@ -1,12 +1,20 @@ -import { createContext, useContext, ReactNode } from "react"; +import { createContext, useContext, useState, ReactNode } from "react"; -interface SoeMotorContextType {} +interface SoeMotorContextValue { + activeCompany: string | null; + setActiveCompany: (id: string | null) => void; +} -const SoeMotorContext = createContext({}); +const SoeMotorContext = createContext({ + activeCompany: null, + setActiveCompany: () => {}, +}); export function SoeMotorProvider({ children }: { children: ReactNode }) { + const [activeCompany, setActiveCompany] = useState(null); + return ( - + {children} ); diff --git a/client/src/lib/protected-route.tsx b/client/src/lib/protected-route.tsx index 1bc483f..3e91a82 100644 --- a/client/src/lib/protected-route.tsx +++ b/client/src/lib/protected-route.tsx @@ -7,7 +7,7 @@ export function ProtectedRoute({ component: Component, }: { path: string; - component: () => React.JSX.Element; + component: React.ComponentType; }) { const { user, isLoading } = useAuth(); diff --git a/client/src/pages/SOE.tsx b/client/src/pages/SOE.tsx index ca173a7..83a5b4f 100644 --- a/client/src/pages/SOE.tsx +++ b/client/src/pages/SOE.tsx @@ -1,7 +1,2 @@ -export default function SOE() { - return ( -
-

SOE — em desenvolvimento

-
- ); -} +// SOE — Sistema de Operações Empresariais (alias para o módulo Plus/ERP) +export { default } from "./Plus";