LoginContext.tsx 349 Bytes
Newer Older
陈帅's avatar
陈帅 committed
1 2
import { createContext } from 'react';

陈帅's avatar
陈帅 committed
3
export interface LoginContextProps {
陈帅's avatar
陈帅 committed
4 5 6 7 8 9 10
  tabUtil?: {
    addTab: (id: string) => void;
    removeTab: (id: string) => void;
  };
  updateActive?: (activeItem: { [key: string]: string } | string) => void;
}

陈帅's avatar
陈帅 committed
11
const LoginContext: React.Context<LoginContextProps> = createContext({});
陈帅's avatar
陈帅 committed
12 13

export default LoginContext;