Skip to content

Commit

Permalink
fix typecheck and lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Tsaqif <[email protected]>
  • Loading branch information
tsa321 committed Jul 13, 2024
1 parent cbfc9dd commit c49c935
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/hooks/usePaginatedReportActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ function usePaginatedReportActions(reportID?: string, reportActionID?: string) {
[reportActionID, sortedAllReportActions],
);

console.log({reportActions, sortedAllReportActions});

return {
reportActions,
linkedAction,
Expand Down
5 changes: 3 additions & 2 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function ReportScreen({
);

const isPendingActionExist = !!reportActions.at(0)?.pendingAction;
const doesCreatedActionExists = useCallback(() => !!sortedAllReportActions.findLast((action) => ReportActionsUtils.isCreatedAction(action)), [sortedAllReportActions]);
const doesCreatedActionExists = useCallback(() => !!sortedAllReportActions?.findLast((action) => ReportActionsUtils.isCreatedAction(action)), [sortedAllReportActions]);
const isLinkedMessageAvailable = useMemo(() => indexOfLinkedMessage > -1, [indexOfLinkedMessage]);

// The linked report actions should have at least 15 messages (counting as 1 page) above them to fill the screen.
Expand Down Expand Up @@ -733,7 +733,8 @@ function ReportScreen({
(shouldShowSkeleton &&
!reportMetadata.isLoadingInitialReportActions &&
reportActionIDFromRoute &&
sortedAllReportActions.length > 0 &&
sortedAllReportActions &&
sortedAllReportActions?.length > 0 &&
reportActions.length === 0 &&
!isLinkingToMessage)
) {
Expand Down

0 comments on commit c49c935

Please sign in to comment.