manage user credancial

This commit is contained in:
Jaanu423
2025-09-23 13:25:09 +05:30
parent bcd41f81e6
commit 64282654f0
11 changed files with 299 additions and 105 deletions
+20 -1
View File
@@ -58,4 +58,23 @@ export const fetchUserProfile = async () => {
console.error("❌ Error fetching profile:", error);
Alert.alert("Error", "Could not connect to server");
}
};
};
// src/utils/dateFormatter.ts
export const formatDate = (dateString: string): string => {
const date = new Date(dateString);
if (isNaN(date.getTime())) return "Invalid Date";
const options: Intl.DateTimeFormatOptions = {
day: "2-digit",
month: "short",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
hour12: true,
};
return new Intl.DateTimeFormat("en-GB", options).format(date);
};