add workspace navbar status + creation modal
This commit is contained in:
@@ -78,3 +78,22 @@ export const removeProfilePicture = async () => {
|
||||
body: formData,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export interface SearchedUser {
|
||||
id: number | string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
mobile: string;
|
||||
profile_picture: string | null;
|
||||
}
|
||||
|
||||
export const searchUserByExactMobile = async (mobile: string): Promise<SearchedUser | null> => {
|
||||
try {
|
||||
const response = await authFetch(`/api/users/search/?mobile=${encodeURIComponent(mobile)}`);
|
||||
if (!response.ok) return null; // Returns null on 404 or other errors
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user