diff --git a/app/src/app/project/[id].tsx b/app/src/app/project/[id].tsx
index 2127753..77effc7 100644
--- a/app/src/app/project/[id].tsx
+++ b/app/src/app/project/[id].tsx
@@ -1,9 +1,11 @@
import { Stack, useLocalSearchParams, useRouter } from "expo-router";
import { useState } from "react";
import { FlatList, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
-import { Button, Chips } from "../../components/ui";
+import Icon from "../../components/Icon";
+import { Button, Chips, Empty, Separator } from "../../components/ui";
+import { haptic } from "../../lib/haptics";
import { createTask, dropProject, updateProject, updateTask } from "../../lib/store";
-import { C } from "../../lib/theme";
+import { C, radius, shadow, space, type } from "../../lib/theme";
import { useStore } from "../../lib/useStore";
import type { ProjectStatus } from "../../lib/types";
@@ -16,7 +18,7 @@ export default function ProjectDetail() {
const [draft, setDraft] = useState("");
const project = store.projects.find((p) => p.id === id);
- if (!project) return Project not found.;
+ if (!project) return Project not found.;
const tasks = store.tasks
.filter((t) => t.project_id === id && t.status !== "done" && t.status !== "trashed")
@@ -26,13 +28,14 @@ export default function ProjectDetail() {
const title = draft.trim();
if (!title) return;
setDraft("");
+ haptic.success();
createTask({ title, status: "next", project_id: id });
};
return (
-
+
t.id}
- renderItem={({ item }) => (
- router.push(`/task/${item.id}`)}>
+ renderItem={({ item, index }) => (
+ [
+ s.row,
+ index === 0 && s.first,
+ index === tasks.length - 1 && s.last,
+ pressed && { backgroundColor: C.surface2 },
+ ]}
+ onPress={() => router.push(`/task/${item.id}`)}
+ >
updateTask(item.id, { status: "done" })}
+ onPress={() => {
+ haptic.success();
+ updateTask(item.id, { status: "done" });
+ }}
/>
- {item.title}
+
+ {item.title}
+
{[item.status, item.context].filter(Boolean).join(" ยท ")}
+
)}
- ListEmptyComponent={No open tasks in this project.}
+ ItemSeparatorComponent={() => }
+ ListEmptyComponent={No open tasks in this project.}
+ contentContainerStyle={s.listContent}
+ showsVerticalScrollIndicator={false}
/>
-
+