import { createContext, useContext, useState, ReactNode } from "react"; interface SoeMotorContextValue { activeCompany: string | null; setActiveCompany: (id: string | null) => void; } const SoeMotorContext = createContext({ activeCompany: null, setActiveCompany: () => {}, }); export function SoeMotorProvider({ children }: { children: ReactNode }) { const [activeCompany, setActiveCompany] = useState(null); return ( {children} ); } export function useSoeMotor() { return useContext(SoeMotorContext); }