Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-solecki committed Jan 16, 2024
1 parent 0ae8a0c commit 0256f51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/AddressSearch/CurrentLocationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function CurrentLocationButton({onPress, isDisabled = false}: CurrentLocationBut
<PressableWithFeedback
style={[styles.flexRow, styles.pv4, styles.ph3, isDisabled && styles.buttonOpacityDisabled]}
hoverStyle={StyleUtils.getButtonBackgroundColorStyle(getButtonState(true), true)}
onPress={onPress}
onPress={() => onPress?.()}
accessibilityLabel={translate('location.useCurrent')}
disabled={isDisabled}
onMouseDown={(e) => e.preventDefault()}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddressSearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type Locale from '@src/types/onyx/Locale';

type CurrentLocationButtonProps = {
/** Callback that is called when the button is clicked */
onPress: () => void;
onPress?: () => void;

/** Boolean to indicate if the button is clickable */
isDisabled?: boolean;
Expand Down

0 comments on commit 0256f51

Please sign in to comment.