mirror of
http://88.130.71.182:3000/BlitTech/badoHair_fe.git
synced 2026-06-13 08:58:31 +00:00
Fix product stock, booking actions, settings, reservation UX, nav and category filter
This commit is contained in:
@@ -11,7 +11,7 @@ interface AuthContextType {
|
||||
isLoading: boolean;
|
||||
isAdmin: boolean;
|
||||
login: (email: string, password: string) => Promise<UserProfile>;
|
||||
register: (email: string, password: string, name: string) => Promise<UserProfile>;
|
||||
register: (email: string, password: string, name: string) => Promise<UserProfile | null>;
|
||||
logout: () => void;
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ export const AuthProvider = ({ children }: { children: ReactNode }) => {
|
||||
return profile;
|
||||
};
|
||||
|
||||
const register = async (email: string, password: string, name: string): Promise<UserProfile> => {
|
||||
const register = async (email: string, password: string, name: string): Promise<UserProfile | null> => {
|
||||
const profile = await authApi.register(email, password, name);
|
||||
setUser(profile);
|
||||
if (profile) setUser(profile);
|
||||
return profile;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user