diff --git a/apps/frontend/src/assets/images/icons/sync.svg b/apps/frontend/src/assets/images/icons/sync.svg index 209cf2ac..212bb4a7 100644 --- a/apps/frontend/src/assets/images/icons/sync.svg +++ b/apps/frontend/src/assets/images/icons/sync.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/styles.module.css b/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/styles.module.css index a8c20ec5..eeb65f3b 100644 --- a/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/styles.module.css +++ b/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/styles.module.css @@ -13,5 +13,15 @@ } .sync-time-overdue { + display: flex; + flex-direction: row; + gap: 8px; + align-items: center; + max-height: 20px; + margin-left: 16px; + font-family: Inter, sans-serif; + font-size: 16px; + font-weight: 500; + line-height: 120%; color: var(--color-danger); } diff --git a/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/sync-time.tsx b/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/sync-time.tsx index e2e553a8..54824017 100644 --- a/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/sync-time.tsx +++ b/apps/frontend/src/pages/project/libs/components/contributors-list/libs/components/sync-time/sync-time.tsx @@ -26,11 +26,13 @@ const SyncTime = ({ : null; useEffect(() => { - if (lastUpdateLabel && lastUpdateLabel.hoursDifference !== undefined) { + if (lastUpdateLabel?.hoursDifference !== undefined) { setIsOverdue(lastUpdateLabel.hoursDifference >= OVERDUE_LIMIT); } }, [lastUpdateLabel]); + const hasSyncTime = lastUpdateLabel && lastActivityUserName; + return ( - - - {lastUpdateLabel?.label} • {lastActivityUserName} - - {isOverdue ? ( - - ) : ( + + {lastUpdateLabel.label} • {lastActivityUserName} + - )} - + + )} ); }; diff --git a/packages/shared/src/libs/helpers/get-sync-time/get-sync-time.helper.ts b/packages/shared/src/libs/helpers/get-sync-time/get-sync-time.helper.ts index b2709a59..0d6f3e9a 100644 --- a/packages/shared/src/libs/helpers/get-sync-time/get-sync-time.helper.ts +++ b/packages/shared/src/libs/helpers/get-sync-time/get-sync-time.helper.ts @@ -5,11 +5,11 @@ type SyncTimeResult = { label: string; }; -const getSyncTime = (date: Date, baseDate: Date): SyncTimeResult => { - const HOURS_IN_A_DAY = 24; - const ONE_HOUR = 1; - const ZERO_HOURS = 0; +const HOURS_IN_A_DAY = 24; +const ONE_HOUR = 1; +const ZERO_HOURS = 0; +const getSyncTime = (date: Date, baseDate: Date): SyncTimeResult => { const hoursDifference = differenceInHours(baseDate, date); if (hoursDifference === ZERO_HOURS) {
- {lastUpdateLabel?.label} • {lastActivityUserName} -
+ {lastUpdateLabel.label} • {lastActivityUserName} +