mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
31 lines
708 B
TypeScript
31 lines
708 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() {
|
|
return;
|
|
},
|
|
access_token: "",
|
|
clientId: "",
|
|
clientSecret: "",
|
|
setCredentials() {
|
|
return;
|
|
},
|
|
setAccess_token() {
|
|
return;
|
|
},
|
|
});
|
|
|
|
export default authContext;
|