revert clickable dashboard stats

This commit is contained in:
daniel31x13
2025-11-16 13:23:08 -05:00
parent 9fc9e597e1
commit 0c512345b1
2 changed files with 3 additions and 13 deletions

View File

@@ -1,24 +1,18 @@
import { Href, router } from "expo-router";
import { Text, TouchableOpacity, View } from "react-native";
import { Text, View } from "react-native";
export default function DashboardItem({
name,
value,
icon,
color,
to,
}: {
name: string;
value: number;
icon: React.ReactNode;
color: string;
to: Href;
}) {
return (
<TouchableOpacity
className="flex-1 flex-col gap-2 rounded-xl bg-base-200 p-3"
onPress={() => router.navigate(to as Href)}
>
<View className="flex-1 flex-col gap-2 rounded-xl bg-base-200 p-3">
<View className="flex-row justify-between">
<View
className="flex-col gap-2 rounded-full aspect-square flex justify-center items-center"
@@ -36,6 +30,6 @@ export default function DashboardItem({
</Text>
</View>
<Text className="font-semibold text-neutral">{name}</Text>
</TouchableOpacity>
</View>
);
}

View File

@@ -60,14 +60,12 @@ const DashboardSection: React.FC<DashboardSectionProps> = ({
value={numberOfLinks}
icon={<Link size={23} color="white" />}
color="#9c00cc"
to="/(tabs)/links"
/>
<DashboardItem
name={collectionsLength === 1 ? "Collection" : "Collections"}
value={collectionsLength}
icon={<Folder size={23} color="white" fill="white" />}
color="#0096cc"
to="/(tabs)/collections"
/>
</View>
<View className="flex-row gap-4">
@@ -76,14 +74,12 @@ const DashboardSection: React.FC<DashboardSectionProps> = ({
value={tagsLength}
icon={<Hash size={23} color="white" />}
color="#00cc99"
to="/(tabs)/tags"
/>
<DashboardItem
name={"Pinned Links"}
value={numberOfPinnedLinks}
icon={<Pin size={23} color="white" fill="white" />}
color="#cc6d00"
to="/dashboard/pinned-links"
/>
</View>
</View>