Skip to content

Commit 5ddc11a

Browse files
committed
better profile pages
1 parent ef0aed6 commit 5ddc11a

File tree

5 files changed

+309
-106
lines changed

5 files changed

+309
-106
lines changed

app/(drawer)/(tabs)/payments/index.tsx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -548,41 +548,35 @@ const PaymentsContent = () => {
548548
[getPrimaryColor, searchLoading]
549549
);
550550

551-
const navigateToUserMessages = useCallback(
552-
({ pubkey, profile }: { pubkey: string; profile: UserProfile }) => {
553-
router.navigate({
554-
pathname: '/userMessages',
555-
params: {
556-
pubkey: pubkey,
557-
profile: JSON.stringify(profile),
558-
},
559-
});
560-
},
561-
[]
562-
);
551+
const navigateToProfile = useCallback(({ pubkey }: { pubkey: string }) => {
552+
router.navigate({
553+
pathname: '/(user-flow)/profile' as any,
554+
params: {
555+
pubkey: pubkey,
556+
},
557+
});
558+
}, []);
563559

564560
// Handler for recommended user press (currently unused, kept for future RecommendedUsers component)
565561
const _handleRecommendedUserPress = useCallback(
566562
(user: UserProfile) => {
567-
navigateToUserMessages({
563+
navigateToProfile({
568564
pubkey: user.pubkey,
569-
profile: user,
570565
});
571566
},
572-
[navigateToUserMessages]
567+
[navigateToProfile]
573568
);
574569

575570
// Memoized handler for search result press
576571
const handleSearchResultPress = useCallback(
577572
(result: DisplayResult) => {
578573
if (!searchLoading && result.profile) {
579-
navigateToUserMessages({
574+
navigateToProfile({
580575
pubkey: result.pubkey,
581-
profile: result.profile,
582576
});
583577
}
584578
},
585-
[searchLoading, navigateToUserMessages]
579+
[searchLoading, navigateToProfile]
586580
);
587581

588582
// Dismiss keyboard when tapping outside

0 commit comments

Comments
 (0)