1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 15:07:27 +00:00
festa/contexts/login.tsx

13 lines
500 B
TypeScript
Raw Normal View History

2022-05-29 02:01:56 +00:00
import { FestaLoginData } from "../types/user";
2022-05-27 00:46:30 +00:00
import { createStateContext } from "../utils/stateContext";
2022-05-24 16:55:21 +00:00
/**
* Context containing data about the user's current login status:
* - `null` if the user is not logged in
* - an instance of {@link LoginData} if the user is logged in
*
* Please note that the data containing in this context is not validated, and will need to be validated by the server on every request.
*/
2022-05-29 02:01:56 +00:00
export const LoginContext = createStateContext<FestaLoginData | null>()