Skip to content

Commit 24925a2

Browse files
committed
💄 app: add haptic feedback to card actions
1 parent 315ac18 commit 24925a2

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";
@@ -331,6 +332,7 @@ export default function Card() {
331332
justifyContent="space-between"
332333
cursor="pointer"
333334
onPress={() => {
335+
selectionAsync().catch(reportError);
334336
revealCard().catch(reportError);
335337
}}
336338
>
@@ -358,6 +360,7 @@ export default function Card() {
358360
cursor="pointer"
359361
onPress={() => {
360362
if (isFetchingCard || isSettingCardStatus) return;
363+
selectionAsync().catch(reportError);
361364
if (cardDetails.status === "FROZEN") {
362365
changeCardStatus("ACTIVE");
363366
return;
@@ -393,6 +396,7 @@ export default function Card() {
393396
justifyContent="space-between"
394397
cursor="pointer"
395398
onPress={() => {
399+
selectionAsync().catch(reportError);
396400
setDisplayPIN(true);
397401
}}
398402
>
@@ -416,6 +420,7 @@ export default function Card() {
416420
gap="$s3"
417421
onPress={() => {
418422
if (!limit) return;
423+
selectionAsync().catch(reportError);
419424
setSpendingLimitsOpen(true);
420425
}}
421426
>

0 commit comments

Comments
 (0)