import React from 'react' ; import { ISubscriberJwt } from '@notifire/shared' ; export interface IAuthContext { setToken : ( token : string ) => void ; setUser : ( profile : ISubscriberJwt ) => void ; token : string | null ; user : ISubscriberJwt | null ; isLoggedIn : boolean ; } export const AuthContext = React . createContext < IAuthContext > ( { token : null , user : null , setToken : ( token ) => { } , setUser : ( user ) => { } , isLoggedIn : null , } as any ) ;