mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-08 08:17:31 +00:00
25 lines
615 B
TypeScript
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;
|