spotube/src/context/authContext.ts
KRTirtho 4b513f91d8 Fixes:
- restart the app to complete login
- no volume caching
- cached image memory leak
2021-03-30 22:14:15 +06:00

25 lines
615 B
TypeScript

import React, { Dispatch, SetStateAction } from "react";
import { Credentials } from "../app";
export interface AuthContext {
isLoggedIn: boolean;
setIsLoggedIn: Dispatch<SetStateAction<boolean>>;
clientId: string;
clientSecret: string;
access_token: string;
setCredentials: Dispatch<SetStateAction<Credentials>>
setAccess_token: Dispatch<SetStateAction<string>>;
}
const authContext = React.createContext<AuthContext>({
isLoggedIn: false,
setIsLoggedIn() {},
access_token: "",
clientId: "",
clientSecret: "",
setCredentials(){},
setAccess_token() {},
});
export default authContext;