add workspace navbar status + creation modal

This commit is contained in:
2026-03-12 09:20:25 +08:00
parent bc099512db
commit 94489a7769
11 changed files with 648 additions and 16 deletions

View File

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