import React from "react"; export interface User { id: string; email: string; is_superuser: boolean; groups: string[]; full_name: string; username: string; permissions: string[]; } interface UserContext { user: User | null | undefined; login: (username: string, password: string) => Promise; logout: () => Promise; changePassword: (oldPassword: string, newPassword1: string, newPassword2: string) => Promise; /** * Horrid name! This is to prevent a flash of loginscreen or ui when getting an already logged in user. */ hasTriedToFetchUser: boolean; } declare const UserContext: React.Context; export declare const useUser: () => UserContext; export declare const UserContextProvider: React.FC; export default UserContext;