Skip to content

Commit 7623903

Browse files
committed
💄 app: add haptic feedback to card actions
1 parent 181cee2 commit 7623903

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@exactly/mobile": patch
3+
---
4+
5+
💄 add haptic feedback to card actions

‎src/components/card/Card.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useRef, useState } from "react";
22
import { Trans, useTranslation } from "react-i18next";
33
import { RefreshControl } from "react-native";
44

5+
import { selectionAsync } from "expo-haptics";
56
import { useRouter } from "expo-router";
67

78
import { ChevronRight, CircleHelp, CreditCard, DollarSign, Eye, EyeOff, Hash, Snowflake } from "@tamagui/lucide-icons";
@@ -332,6 +333,7 @@ export default function Card() {
332333
justifyContent="space-between"
333334
cursor="pointer"
334335
onPress={() => {
336+
selectionAsync().catch(reportError);
335337
revealCard().catch(reportError);
336338
}}
337339
>
@@ -355,6 +357,7 @@ export default function Card() {
355357
cursor="pointer"
356358
onPress={() => {
357359
if (isFetchingCard || isSettingCardStatus) return;
360+
selectionAsync().catch(reportError);
358361
if (cardDetails.status === "FROZEN") {
359362
changeCardStatus("ACTIVE");
360363
return;
@@ -390,6 +393,7 @@ export default function Card() {
390393
justifyContent="space-between"
391394
cursor="pointer"
392395
onPress={() => {
396+
selectionAsync().catch(reportError);
393397
setDisplayPIN(true);
394398
}}
395399
>
@@ -413,6 +417,7 @@ export default function Card() {
413417
gap="$s3"
414418
onPress={() => {
415419
if (!limit) return;
420+
selectionAsync().catch(reportError);
416421
setSpendingLimitsOpen(true);
417422
}}
418423
>

0 commit comments

Comments
 (0)