Skip to content

Commit 3ef8499

Browse files
committed
💄 app: refine portfolio tap feedback
1 parent 5d7c84a commit 3ef8499

3 files changed

Lines changed: 19 additions & 4 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+
💄 refine portfolio tap feedback

‎src/components/home/PortfolioSummary.tsx‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import { useTranslation } from "react-i18next";
33

4+
import { selectionAsync } from "expo-haptics";
45
import { useRouter } from "expo-router";
56

67
import { ChevronRight } from "@tamagui/lucide-icons";
@@ -9,6 +10,7 @@ import { View, XStack, YStack } from "tamagui";
910
import { useQuery } from "@tanstack/react-query";
1011

1112
import { selectBalance } from "../../utils/isProcessing";
13+
import reportError from "../../utils/reportError";
1214
import Amount from "../shared/Amount";
1315
import AssetLogo from "../shared/AssetLogo";
1416
import Text from "../shared/Text";
@@ -47,12 +49,20 @@ export default function PortfolioSummary({
4749
const extra = uniqueAssets.length - 3;
4850

4951
return (
50-
<YStack gap="$s5" cursor="pointer" onPress={() => router.push("/portfolio")}>
52+
<YStack
53+
gap="$s5"
54+
cursor="pointer"
55+
group="portfolio"
56+
onPress={() => {
57+
selectionAsync().catch(reportError);
58+
router.push("/portfolio");
59+
}}
60+
>
5161
<XStack justifyContent="space-between" alignItems="center" width="100%">
5262
<Text emphasized headline>
5363
{t("Portfolio")}
5464
</Text>
55-
<XStack alignItems="center" gap="$s1">
65+
<XStack alignItems="center" gap="$s1" $group-portfolio-press={{ opacity: 0.7 }}>
5666
<Text emphasized subHeadline color="$interactiveBaseBrandDefault">
5767
{t("Manage portfolio")}
5868
</Text>

‎tamagui.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const body = createFont({
235235
const tamagui = createTamagui({
236236
...config,
237237
tokens,
238-
groups: { column: { pseudo: true } },
238+
groups: { column: { pseudo: true }, portfolio: { pseudo: true } },
239239
fonts: {
240240
body,
241241
heading: body,
@@ -555,7 +555,7 @@ declare module "tamagui" {
555555
interface TamaguiCustomConfig extends Config {} // eslint-disable-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-interface
556556
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
557557
interface TypeOverride {
558-
groupNames(): "column";
558+
groupNames(): "column" | "portfolio";
559559
}
560560
}
561561
export default tamagui;

0 commit comments

Comments
 (0)