free agents
This commit is contained in:
@@ -14,12 +14,14 @@ interface AuthData {
|
||||
user: Player | undefined;
|
||||
metadata: { accentColor: MantineColor; colorScheme: MantineColorScheme };
|
||||
roles: string[];
|
||||
phone: string;
|
||||
}
|
||||
|
||||
export const defaultAuthData: AuthData = {
|
||||
user: undefined,
|
||||
metadata: { accentColor: "blue", colorScheme: "auto" },
|
||||
roles: [],
|
||||
phone: ""
|
||||
};
|
||||
|
||||
export interface AuthContextType extends AuthData {
|
||||
@@ -59,6 +61,7 @@ export const AuthProvider: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
user: data?.user || defaultAuthData.user,
|
||||
metadata: data?.metadata || defaultAuthData.metadata,
|
||||
roles: data?.roles || defaultAuthData.roles,
|
||||
phone: data?.phone || "",
|
||||
set,
|
||||
}),
|
||||
[data, defaultAuthData]
|
||||
|
||||
Reference in New Issue
Block a user