Skip to content

Commit

Permalink
what happened to the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Sep 4, 2024
1 parent d963a77 commit 92f2556
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function ProfileAvatarRow({ size = ProfileAvatarSize }: { size?: number }
const ContextMenuButton = onAvatarPressProfile ? React.Fragment : ContextMenu;

const handlePressMenuItem = useLatestCallback((e: any) => {
const index = avatarContextMenuConfig.menuItems?.findIndex(item => item.actionKey === e.nativeEvent.actionKey);
const index = avatarContextMenuConfig?.menuItems?.findIndex(item => item && item.actionKey === e.nativeEvent.actionKey);
onSelectionCallback(index);
});

Expand Down
1 change: 0 additions & 1 deletion src/config/experimentalHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import isTestFlight from '@/helpers/isTestFlight';

const useExperimentalFlag = (name: any) => {
if (IS_DEV || isTestFlight) {
// @ts-expect-error ts-migrate(2339) FIXME: Property 'config' does not exist on type '{}'.
// eslint-disable-next-line react-hooks/rules-of-hooks
return useContext(RainbowContext).config[name];
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useImportingWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function useImportingWallet({ showImportModal = true } = {}) {
}
setResolvedAddress(address);
name = forceEmoji ? `${forceEmoji} ${input}` : input;
avatarUrl = avatarUrl || avatar?.imageUrl;
avatarUrl = avatarUrl || (avatar && avatar?.imageUrl);
setBusy(false);
startImportProfile(name, guardedForceColor, address, avatarUrl);
analytics.track('Show wallet profile modal for ENS address', {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useOnAvatarPress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default ({ screenType = 'transaction' }: UseOnAvatarPressProps = {}) => {
].filter(x => x),
};

const avatarActionSheetOptions = avatarContextMenuConfig.menuItems.map(item => item.actionTitle).concat(ios ? ['Cancel'] : []);
const avatarActionSheetOptions = avatarContextMenuConfig.menuItems.map(item => item && item.actionTitle).concat(ios ? ['Cancel'] : []);

const onAvatarPressProfile = useCallback(() => {
navigate(Routes.PROFILE_SHEET, {
Expand Down
4 changes: 2 additions & 2 deletions src/screens/points/PointsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ export function PointsScreen() {
<Navbar
hasStatusBarInset
leftComponent={
pointsEnabled && (
pointsEnabled ? (
<ButtonPressAnimation onPress={() => navigate(Routes.CHANGE_WALLET_SHEET)} scaleTo={0.8} overflowMargin={50}>
{accountImage ? (
<ImageAvatar image={accountImage} marginRight={10} size="header" />
) : (
<ContactAvatar color={accountColor} marginRight={10} size="small" value={accountSymbol} />
)}
</ButtonPressAnimation>
)
) : null
}
rightComponent={pointsNotificationsToggleEnabled ? <NotificationToggleContextMenu /> : undefined}
title={rewardsEnabled ? i18n.t(i18n.l.account.tab_rewards) : i18n.t(i18n.l.account.tab_points)}
Expand Down

0 comments on commit 92f2556

Please sign in to comment.