From 5055a700c987c50671cf503aa36ff62d03f17716 Mon Sep 17 00:00:00 2001 From: sarendsen Date: Mon, 6 Jan 2025 13:59:56 +0100 Subject: [PATCH] wip --- components/Button.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/Button.tsx b/components/Button.tsx index a1005e49..c5c0b746 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -1,6 +1,6 @@ import * as Haptics from "@/packages/expo-haptics"; import React, { PropsWithChildren, ReactNode, useMemo } from "react"; -import { Text, TouchableOpacity, View } from "react-native"; +import { Platform, Text, TouchableOpacity, View } from "react-native"; import { Loader } from "./Loader"; export interface ButtonProps @@ -54,7 +54,9 @@ export const Button: React.FC> = ({ onPress={() => { if (!loading && !disabled && onPress) { onPress(); - Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); + if (!Platform.isTV) { + Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); + } } }} disabled={disabled || loading}