Skip to content

Commit c809b50

Browse files
committed
Fix lint
1 parent 0f57d20 commit c809b50

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/pages/workspace/hr/WorkspaceHRPage.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function WorkspaceHRPage({
5252
const gustoConnection = policy?.connections?.gusto;
5353
const isConnected = isGustoConnected(policy);
5454
const isGustoSyncInProgress = connectionSyncProgress?.connectionName === CONST.POLICY.CONNECTIONS.NAME.GUSTO && isConnectionInProgress(connectionSyncProgress, policy);
55+
const stageInProgress = connectionSyncProgress?.stageInProgress;
5556
const successfulDate = getIntegrationLastSuccessfulDate(
5657
getLocalDateFromDatetime,
5758
gustoConnection,
@@ -60,16 +61,16 @@ function WorkspaceHRPage({
6061
const hasGustoSyncError = !isGustoSyncInProgress && gustoConnection?.lastSync?.isSuccessful === false && !!gustoConnection?.lastSync?.errorDate;
6162
const lastSyncErrorMessage = hasGustoSyncError ? (gustoConnection?.lastSync?.errorMessage ?? translate('workspace.hr.gusto.syncError')) : undefined;
6263
const connectionDescription = useMemo(() => {
63-
if (isGustoSyncInProgress && connectionSyncProgress?.stageInProgress) {
64-
return translate('workspace.hr.syncStageName', {stage: connectionSyncProgress.stageInProgress});
64+
if (isGustoSyncInProgress && stageInProgress) {
65+
return translate('workspace.hr.syncStageName', {stage: stageInProgress});
6566
}
6667

6768
if (successfulDate && !lastSyncErrorMessage) {
6869
return translate('workspace.hr.gusto.lastSync', datetimeToRelative(successfulDate));
6970
}
7071

7172
return undefined;
72-
}, [connectionSyncProgress?.stageInProgress, datetimeToRelative, isGustoSyncInProgress, lastSyncErrorMessage, successfulDate, translate]);
73+
}, [datetimeToRelative, isGustoSyncInProgress, lastSyncErrorMessage, stageInProgress, successfulDate, translate]);
7374

7475
useWorkspaceDocumentTitle(undefined, 'workspace.common.hr');
7576

0 commit comments

Comments
 (0)