feat: haptic feedback

This commit is contained in:
Adrian Castro
2024-02-22 18:30:58 +01:00
parent 16ed0f8a6a
commit 23cfcb8b1a
2 changed files with 6 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
import { useRef } from "react";
import { Platform, View } from "react-native";
import * as Haptics from "expo-haptics";
import { Tabs } from "expo-router";
import Colors from "@movie-web/tailwind-config/colors";
@@ -21,6 +22,9 @@ export default function TabLayout() {
}}
screenListeners={({ route }) => ({
tabPress: () => {
void Haptics.notificationAsync(
Haptics.NotificationFeedbackType.Success,
);
switch (route.name) {
case "search":
focusSearchInputRef.current();