Format all files with prettier config for baseline

This commit is contained in:
Alex Holliday committed 2024-10-17 12:05:06 +08:00
1 parent d8e2b06eca
commit 15ab9f8bc8
132 files changed
+24210 -23747

No files matched your search

+8 -8
View File
@@ -5,13 +5,13 @@
* @returns {number} Timestamp of the most recent check.
*/
export const getLastChecked = (checks, duration = true) => {
if (!checks || checks.length === 0) {
return 0; // Handle case when no checks are available
}
if (!checks || checks.length === 0) {
return 0; // Handle case when no checks are available
}
// Data is sorted newest -> oldest, so newest check is the most recent
if (!duration) {
return new Date(checks[0].createdAt);
}
return new Date() - new Date(checks[0].createdAt);
// Data is sorted newest -> oldest, so newest check is the most recent
if (!duration) {
return new Date(checks[0].createdAt);
}
return new Date() - new Date(checks[0].createdAt);
};