Skip to content

Commit

Permalink
gear haptic
Browse files Browse the repository at this point in the history
  • Loading branch information
latter-bolden committed Nov 21, 2024
1 parent 46776d6 commit 1e0a246
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/app/features/top/ContactsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
View,
getDisplayName,
isWeb,
triggerHaptic,
} from '@tloncorp/ui';
import { useCallback } from 'react';
import { Alert } from 'react-native';
Expand Down Expand Up @@ -63,14 +64,17 @@ export default function ContactsScreen(props: Props) {
}
}, []);

const backAction = useCallback(() => {
triggerHaptic('baseButtonClick');
navigate('ChatList');
}, [navigate]);

return (
<AppDataContextProvider contacts={contacts} currentUserId={currentUser}>
<View flex={1}>
<ScreenHeader
title="Contacts"
backAction={
contactsTabEnabled ? undefined : () => navigate('ChatList')
}
backAction={contactsTabEnabled ? undefined : backAction}
rightControls={
contactsTabEnabled ? (
<ScreenHeader.IconButton
Expand Down

0 comments on commit 1e0a246

Please sign in to comment.