Fix product stock, booking actions, settings, reservation UX, nav and category filter

This commit is contained in:
belviskhoremk
2026-05-20 23:56:43 +00:00
parent a89793a059
commit affff1c502
12 changed files with 137 additions and 102 deletions

View File

@@ -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;
};