Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ function BaseSelectionList<TItem extends ListItem>(
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
// We're already handling the Enter key press in the useKeyboardShortcut hook, so we don't want the list item to submit the form
shouldPreventEnterKeySubmit
// Change this because of lint
rightHandSideComponent={rightHandSideComponent && (typeof rightHandSideComponent === 'function' ? rightHandSideComponent({} as TItem) : rightHandSideComponent)}
rightHandSideComponent={rightHandSideComponent}
keyForList={item.keyForList ?? ''}
isMultilineSupported={isRowMultilineSupported}
onFocus={() => {
Expand Down
9 changes: 5 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import * as ReportActionsUtils from './ReportActionsUtils';
import StringUtils from './StringUtils';
import * as TransactionUtils from './TransactionUtils';
import * as Url from './Url';
import type {AvatarSource} from './UserUtils';
import * as UserUtils from './UserUtils';

type AvatarRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18;
Expand Down Expand Up @@ -117,7 +118,7 @@ type SpendBreakdown = {
totalDisplaySpend: number;
};

type ParticipantDetails = [number, string, UserUtils.AvatarSource, UserUtils.AvatarSource];
Comment thread
luacmartins marked this conversation as resolved.
type ParticipantDetails = [number, string, AvatarSource, AvatarSource];

type OptimisticAddCommentReportAction = Pick<
ReportAction,
Expand Down Expand Up @@ -587,7 +588,7 @@ function getLastUpdatedReport(): OnyxEntry<Report> {
return lastUpdatedReport;
}

function getCurrentUserAvatar(): UserUtils.AvatarSource | undefined {
function getCurrentUserAvatar(): AvatarSource | undefined {
return currentUserPersonalDetails?.avatar;
}

Expand Down Expand Up @@ -1714,7 +1715,7 @@ function getDefaultWorkspaceAvatarTestID(workspaceName: string): string {
return !alphaNumeric ? defaultAvatarBuildingIconTestID : `SvgDefaultAvatar_${alphaNumeric[0]} Icon`;
}

function getWorkspaceAvatar(report: OnyxEntry<Report>): UserUtils.AvatarSource {
function getWorkspaceAvatar(report: OnyxEntry<Report>): AvatarSource {
const workspaceName = getPolicyName(report, false, allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]);
const avatar = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`]?.avatarURL ?? '';
return !isEmpty(avatar) ? avatar : getDefaultWorkspaceAvatar(workspaceName);
Expand Down Expand Up @@ -1921,7 +1922,7 @@ function getParticipants(reportID: string) {
function getIcons(
report: OnyxEntry<Report>,
personalDetails: OnyxCollection<PersonalDetails>,
defaultIcon: UserUtils.AvatarSource | null = null,
defaultIcon: AvatarSource | null = null,
defaultName = '',
defaultAccountID = -1,
policy: OnyxEntry<Policy> = null,
Expand Down