LoginContext.tsx 341 Bytes
Newer Older
陈帅's avatar
陈帅 committed
1 2 3 4 5 6 7 8 9 10 11 12 13
import { createContext } from 'react';

export interface ILoginContext {
  tabUtil?: {
    addTab: (id: string) => void;
    removeTab: (id: string) => void;
  };
  updateActive?: (activeItem: { [key: string]: string } | string) => void;
}

const LoginContext: React.Context<ILoginContext> = createContext({});

export default LoginContext;