Skip to content

Commit

Permalink
feat: address PR feedback
Browse files Browse the repository at this point in the history
- Use new var instead of mutating destructured var from props
- Avoid 'px' in positioning props
  • Loading branch information
anandaroop committed Dec 31, 2024
1 parent ad75562 commit 9b0dd0b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/app/Scenes/HomeView/Components/ActivityIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ interface ActivityIndicatorProps {
}

export const ActivityIndicator: React.FC<ActivityIndicatorProps> = (props) => {
let { hasUnseenNotifications } = props

const { hasUnseenNotifications } = props
const tracking = useHomeViewTracking()

const { enabled, variant, forceDots } = useActivityDotExperiment()

let BellVariant = BellWithSmallDot
if (enabled && variant !== "control") BellVariant = BellWithLargeDot

hasUnseenNotifications = hasUnseenNotifications || forceDots
const displayUnseenNotifications = hasUnseenNotifications || forceDots

const navigateToActivityPanel = () => {
tracking.tappedNotificationBell()
Expand All @@ -34,7 +33,7 @@ export const ActivityIndicator: React.FC<ActivityIndicatorProps> = (props) => {
onPress={navigateToActivityPanel}
hitSlop={DEFAULT_HIT_SLOP}
>
<BellVariant hasUnseenNotifications={hasUnseenNotifications} />
<BellVariant hasUnseenNotifications={displayUnseenNotifications} />
</TouchableOpacity>
</Box>
)
Expand Down Expand Up @@ -73,8 +72,8 @@ const BellWithLargeDot: React.FC<{ hasUnseenNotifications: boolean }> = (props)
{!!hasUnseenNotifications && (
<Box
position="absolute"
top="-0.5px"
right="0px"
top={-0.5}
right={0}
accessibilityLabel="Unseen Notifications Indicator"
>
<VisualClueDot diameter={8} color={color} />
Expand Down

0 comments on commit 9b0dd0b

Please sign in to comment.