phone auth, image uploading, address broken up

This commit is contained in:
jackiettran committed 2025-07-30 19:12:56 -04:00
1 parent 72d79596ce
commit 7c6c120969
17 files changed
+759 -182

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
export const getImageUrl = (imagePath: string): string => {
// Get the base URL without /api
const apiUrl = process.env.REACT_APP_API_URL || '';
const baseUrl = apiUrl.replace('/api', '');
// If imagePath already includes the full path, use it
if (imagePath.startsWith('/uploads/')) {
return `${baseUrl}${imagePath}`;
}
// Otherwise, construct the full path
return `${baseUrl}/uploads/profiles/${imagePath}`;
};