aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/app
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-15 18:19:09 +0000
committerMohamedBassem <me@mbassem.com>2024-03-15 18:24:17 +0000
commitc4d7223115865474f09661cdbfee60a559f4b2c2 (patch)
treee143f77f8ee0b19bcbde8170063b0cfa59b7306f /apps/mobile/app
parent77b78922e5d16eddbe2f2b8f97b4e8cef1d4f5b3 (diff)
downloadkarakeep-c4d7223115865474f09661cdbfee60a559f4b2c2.tar.zst
fix(mobile): Scroll to the top when the main tab is clicked
Diffstat (limited to 'apps/mobile/app')
-rw-r--r--apps/mobile/app/dashboard/(tabs)/lists.tsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/mobile/app/dashboard/(tabs)/lists.tsx b/apps/mobile/app/dashboard/(tabs)/lists.tsx
index 92ae1c93..2aece541 100644
--- a/apps/mobile/app/dashboard/(tabs)/lists.tsx
+++ b/apps/mobile/app/dashboard/(tabs)/lists.tsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
-import { FlatList, View } from "react-native";
+import { FlatList, View, Text, Pressable } from "react-native";
import { Link } from "expo-router";
import { api } from "@/lib/trpc";
import { ChevronRight } from "lucide-react-native";
@@ -53,12 +53,14 @@ export default function Lists() {
marginTop: 5,
}}
renderItem={(l) => (
- <View className="mx-2 flex flex-row justify-between rounded-xl border border-gray-100 bg-white px-4 py-2">
- <Link key={l.item.id} href={l.item.href} className="text-lg">
- {l.item.logo} {l.item.name}
- </Link>
- <ChevronRight />
- </View>
+ <Link asChild key={l.item.id} href={l.item.href}>
+ <Pressable className="mx-2 flex flex-row justify-between rounded-xl border border-gray-100 bg-white px-4 py-2">
+ <Text className="text-lg">
+ {l.item.logo} {l.item.name}
+ </Text>
+ <ChevronRight />
+ </Pressable>
+ </Link>
)}
data={links}
refreshing={refreshing}