Skip to content

Commit fee6bbe

Browse files
committed
Avatars and names on notifications now link to profiles
Changelog: fix
1 parent 649ff70 commit fee6bbe

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

apps/polycentric/src/features/notifications/Notification.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ function InteractionNotification({
9595
router.push(route ?? Routes.tabs.profile(notification.fromIdentity));
9696
}, [notification]);
9797

98+
const openProfile = useCallback(
99+
() => router.push(Routes.tabs.profile(notification.fromIdentity)),
100+
[notification.fromIdentity],
101+
);
102+
98103
const dim = withHexOpacity(theme.palette.neutral_500, '40');
99104

100105
return (
@@ -110,10 +115,17 @@ function InteractionNotification({
110115
},
111116
]}
112117
>
113-
<ProfileAvatar identityKey={notification.fromIdentity} size="md" />
118+
<ProfileAvatar
119+
identityKey={notification.fromIdentity}
120+
size="md"
121+
onPress={openProfile}
122+
/>
114123
<View style={[Atoms.flex_1, Atoms.gap_xs]}>
115124
<Text>
116-
<Text fontWeight="bold">{name}</Text> {summary(notification)}
125+
<Text fontWeight="bold" onPress={openProfile}>
126+
{name}
127+
</Text>{' '}
128+
{summary(notification)}
117129
{notification.createdAt > 0 ? (
118130
<Text color="neutral_500">
119131
{' '}

0 commit comments

Comments
 (0)