mirror of
https://github.com/Steffo99/festa.git
synced 2024-10-16 23:17:26 +00:00
12 lines
503 B
TypeScript
12 lines
503 B
TypeScript
import { FestaLoginData } from "../../types/user";
|
|
import { createStateContext } from "../../utils/stateContext";
|
|
|
|
|
|
/**
|
|
* Context containing data about the user's current login status:
|
|
* - `null` if the user is not logged in
|
|
* - an instance of {@link FestaLoginData} if the user is logged in
|
|
*
|
|
* Please note that the data containing in this context is not validated, and will be validated by the server on every request.
|
|
*/
|
|
export const LoginContext = createStateContext<FestaLoginData | null>()
|