First working version of EVE-PI
This commit is contained in:
26
src/app/context/Context.tsx
Normal file
26
src/app/context/Context.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { AccessToken, CharacterUpdate } from "@/types";
|
||||
import { Dispatch, SetStateAction, createContext } from "react";
|
||||
|
||||
export const CharacterContext = createContext<{
|
||||
characters: AccessToken[];
|
||||
deleteCharacter: (character: AccessToken) => void;
|
||||
updateCharacter: (character: AccessToken, update: CharacterUpdate) => void;
|
||||
}>({
|
||||
characters: [],
|
||||
deleteCharacter: () => {},
|
||||
updateCharacter: () => {},
|
||||
});
|
||||
|
||||
export const SessionContext = createContext<{
|
||||
sessionReady: boolean;
|
||||
refreshSession: () => void;
|
||||
setSessionReady: Dispatch<SetStateAction<boolean>>;
|
||||
EVE_SSO_CALLBACK_URL: string;
|
||||
EVE_SSO_CLIENT_ID: string;
|
||||
}>({
|
||||
sessionReady: false,
|
||||
refreshSession: () => {},
|
||||
setSessionReady: () => {},
|
||||
EVE_SSO_CALLBACK_URL: "",
|
||||
EVE_SSO_CLIENT_ID: "",
|
||||
});
|
||||
Reference in New Issue
Block a user