don't ask me how, but it works

This commit is contained in:
Chris Sanden
2026-05-05 20:58:03 +02:00
parent a536be1047
commit ac6bfa1022
3 changed files with 327 additions and 394 deletions

View File

@@ -8,8 +8,6 @@ import { Redirect, router, Stack, useFocusEffect } from 'expo-router';
import { useCallback, useEffect, useState } from 'react'; import { useCallback, useEffect, useState } from 'react';
import { Alert, Modal, Pressable, ScrollView, Text, View, ActivityIndicator } from 'react-native'; import { Alert, Modal, Pressable, ScrollView, Text, View, ActivityIndicator } from 'react-native';
import type { SubjectColor } from '@/lib/subjectColors';
const FLOW_STEPS = [ const FLOW_STEPS = [
{ {
label: '1', label: '1',
@@ -77,8 +75,6 @@ export default function Subjects() {
}, [session?.user.id]); }, [session?.user.id]);
const GetSubjects = useCallback(async () => { const GetSubjects = useCallback(async () => {
if (!session?.user.id) return;
const GetSubjects = async () => {
if (!session?.user.id) { if (!session?.user.id) {
SetIsLoading(false); SetIsLoading(false);
return; return;
@@ -86,8 +82,6 @@ export default function Subjects() {
SetIsLoading(true); SetIsLoading(true);
SetIsLoading(true);
const { data, error } = await supabase const { data, error } = await supabase
.from('subjects') .from('subjects')
.select('*') .select('*')
@@ -98,14 +92,11 @@ export default function Subjects() {
if (error) { if (error) {
Alert.alert('Subjects could not be fetched, please try again'); Alert.alert('Subjects could not be fetched, please try again');
SetIsLoading(false);
return; return;
} }
SetSubjects((data as Subject[]) ?? []); SetSubjects((data as Subject[]) ?? []);
}, [session?.user.id]); }, [session?.user.id]);
SetIsLoading(false);
};
useFocusEffect( useFocusEffect(
useCallback(() => { useCallback(() => {
@@ -121,6 +112,8 @@ export default function Subjects() {
if (needsSetup) { if (needsSetup) {
return <Redirect href="/setup" />; return <Redirect href="/setup" />;
}
const RenderSubjectCard = (subject: Subject) => { const RenderSubjectCard = (subject: Subject) => {
const colorKey: SubjectColor = subject.color ?? 'slate'; const colorKey: SubjectColor = subject.color ?? 'slate';
const colorSet = SUBJECT_COLORS[colorKey]; const colorSet = SUBJECT_COLORS[colorKey];

View File

@@ -348,39 +348,36 @@ export default function ViewDetailsSubject() {
<View className="mt-5"> <View className="mt-5">
<View className="mb-2 flex-row items-center justify-between"> <View className="mb-2 flex-row items-center justify-between">
<Text className="text-sm font-semibold text-text-secondary"> <Text className="text-sm font-semibold text-text-secondary">
Assignments completed Assignment Progress
</Text> </Text>
{totalAssignments > 0 ? (
<View className="mt-5">
<View className="mb-2 flex-row items-center justify-between">
<Text className="text-sm font-semibold text-text-secondary">
Assignment Progress
</Text>
<Text className="text-sm font-bold text-text-main"> <Text className="text-sm font-bold text-text-main">
{completedAssignments}/{totalAssignments} {completedAssignments}/{totalAssignments}
</Text>
</View>
<View className="h-3 overflow-hidden rounded-full bg-app-subtle">
<View
className="h-full rounded-full"
style={{
width: `${progress}%`,
backgroundColor: colorSet.strong,
}}
/>
</View>
<Text className="mt-2 text-xs font-medium text-text-secondary">
{remainingAssignments === 0
? 'All assignments complete'
: `${remainingAssignments} assignment${
remainingAssignments === 1 ? '' : 's'
} remaining`}
</Text> </Text>
</View> </View>
) : null}
<View className="h-3 overflow-hidden rounded-full bg-app-subtle">
<View
className="h-full rounded-full"
style={{
width: `${progress}%`,
backgroundColor: colorSet.strong,
}}
/>
</View>
<Text className="mt-2 text-xs font-medium text-text-secondary">
{remainingAssignments === 0
? 'All assignments complete'
: `${remainingAssignments} assignment${
remainingAssignments === 1 ? '' : 's'
} remaining`}
</Text>
<Text className="mt-1 text-xs text-text-muted">
Based only on completed assignments in this subject.
</Text>
</View>
<Text className="mt-4 text-sm text-text-muted"> <Text className="mt-4 text-sm text-text-muted">
Last changed: {formatDateTime(subject.lastChanged)} Last changed: {formatDateTime(subject.lastChanged)}

View File

@@ -31,65 +31,46 @@ function formatTrackedTime(totalSeconds: number) {
} }
export default function ViewDetailsTask() { export default function ViewDetailsTask() {
const { tId } = useLocalSearchParams<{ tId: string }>(); const { tId } = useLocalSearchParams<{ tId: string }>();
const [task, SetTask] = useState<Task | null>(null); const [task, SetTask] = useState<Task | null>(null);
const [session, SetSession] = useState<Session | null>(null); const [session, SetSession] = useState<Session | null>(null);
const [completedFocusSessions, setCompletedFocusSessions] = useState(0); const [isLoading, SetIsLoading] = useState(false);
const [contextMeta, setContextMeta] = useState({ const [completedFocusSessions, setCompletedFocusSessions] = useState(0);
subjectTitle: 'No Subject', const [contextMeta, setContextMeta] = useState({
assignmentTitle: 'No Assignment', subjectTitle: 'No Subject',
subjectColor: 'slate' as SubjectColor, assignmentTitle: 'No Assignment',
}); subjectColor: 'slate' as SubjectColor,
useEffect(() => {
supabase.auth.getSession().then(({ data }) => SetSession(data.session ?? null));
const { data: sub } = supabase.auth.onAuthStateChange((_event, newSession) => {
SetSession(newSession);
}); });
return () => sub.subscription.unsubscribe(); useEffect(() => {
}, []); supabase.auth.getSession().then(({ data }) => SetSession(data.session ?? null));
const loadTaskStudyActivity = useCallback(async (taskId: string, userId: string) => { const { data: sub } = supabase.auth.onAuthStateChange((_event, newSession) => {
const { count, error } = await supabase SetSession(newSession);
.from('sprint_sessions') });
.select('sessionId', { count: 'exact', head: true })
.eq('taskId', taskId)
.eq('userId', userId)
.eq('sessionType', 'focus')
.eq('status', 'completed');
if (error) { return () => sub.subscription.unsubscribe();
setCompletedFocusSessions(0); }, []);
return;
}
setCompletedFocusSessions(count ?? 0); const loadTaskStudyActivity = useCallback(async (taskId: string, userId: string) => {
}, []); const { count, error } = await supabase
.from('sprint_sessions')
.select('sessionId', { count: 'exact', head: true })
.eq('taskId', taskId)
.eq('userId', userId)
.eq('sessionType', 'focus')
.eq('status', 'completed');
const GetTask = useCallback(async (taskId: string) => { if (error) {
const { data, error } = await supabase setCompletedFocusSessions(0);
.from('tasks') return;
.select('*') }
.eq('tId', taskId)
.single();
if (error || !data) { setCompletedFocusSessions(count ?? 0);
Alert.alert('Task could not be fetched, please try again'); }, []);
return;
}
SetTask(data); const GetTask = useCallback(async (taskId: string) => {
await loadTaskStudyActivity(taskId, data.uId);
if (data.aId) {
const { data: assignmentData, error: assignmentError } = await supabase
.from('assignments')
.select('title, sId')
.eq('aId', data.aId)
const GetTask = async (taskId: string) => {
SetIsLoading(true); SetIsLoading(true);
const { data, error } = await supabase const { data, error } = await supabase
@@ -98,129 +79,112 @@ const GetTask = useCallback(async (taskId: string) => {
.eq('tId', taskId) .eq('tId', taskId)
.single(); .single();
SetIsLoading(false); if (error || !data) {
SetTask(null);
if (assignmentError || !assignmentData) {
setContextMeta({ setContextMeta({
subjectTitle: 'Unknown Subject', subjectTitle: 'Unknown Subject',
assignmentTitle: 'Unknown Assignment', assignmentTitle: 'Unknown Assignment',
subjectColor: 'slate', subjectColor: 'slate',
}); });
setCompletedFocusSessions(0);
SetIsLoading(false);
Alert.alert('Task could not be fetched, please try again');
return; return;
} }
if (assignmentData.sId) {
const { data: subjectData, error: subjectError } = await supabase
.from('subjects')
.select('title, color')
.eq('sId', assignmentData.sId)
.single();
if (subjectError || !subjectData) {
SetTask(data); SetTask(data);
await loadTaskStudyActivity(taskId, data.uId);
let nextContextMeta = {
subjectTitle: 'Unknown Subject',
assignmentTitle: 'Unknown Assignment',
subjectColor: 'slate' as SubjectColor,
};
if (data.aId) { if (data.aId) {
SetIsLoading(true);
const { data: assignmentData, error: assignmentError } = await supabase const { data: assignmentData, error: assignmentError } = await supabase
.from('assignments') .from('assignments')
.select('title, sId') .select('title, sId')
.eq('aId', data.aId) .eq('aId', data.aId)
.single(); .single();
SetIsLoading(false); if (!assignmentError && assignmentData) {
nextContextMeta.assignmentTitle = assignmentData.title ?? 'Unknown Assignment';
if (assignmentError || !assignmentData) { if (assignmentData.sId) {
setContextMeta({ const { data: subjectData, error: subjectError } = await supabase
subjectTitle: 'Unknown Subject', .from('subjects')
assignmentTitle: assignmentData.title ?? 'Unknown Assignment', .select('title, color')
subjectColor: 'slate', .eq('sId', assignmentData.sId)
}); .single();
return;
}
setContextMeta({ if (!subjectError && subjectData) {
subjectTitle: subjectData.title ?? 'Unknown Subject', nextContextMeta = {
assignmentTitle: assignmentData.title ?? 'Unknown Assignment', subjectTitle: subjectData.title ?? 'Unknown Subject',
subjectColor: (subjectData.color as SubjectColor | undefined) ?? 'slate', assignmentTitle: assignmentData.title ?? 'Unknown Assignment',
}); subjectColor: (subjectData.color as SubjectColor | undefined) ?? 'slate',
} };
} }
}, [loadTaskStudyActivity]);
if (assignmentData.sId) {
SetIsLoading(true);
const { data: subjectData, error: subjectError } = await supabase
.from('subjects')
.select('title, color')
.eq('sId', assignmentData.sId)
.single();
SetIsLoading(false);
if (subjectError || !subjectData) {
setContextMeta({
subjectTitle: 'Unknown Subject',
assignmentTitle: assignmentData.title ?? 'Unknown Assignment',
subjectColor: 'slate',
});
return;
} }
useFocusEffect(
useCallback(() => {
if (session && tId) {
GetTask(tId);
}
}, [GetTask, session, tId])
);
const handleSprintStart = async () => {
const activeSession = await GetActiveSession();
if (!activeSession) {
router.push({
pathname: '/task/timer',
params: {
tId: task?.tId,
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES),
},
});
return;
}
const secondsLeft = Math.ceil((activeSession.endTime - Date.now()) / 1000)
if (secondsLeft <= 0) {
await finalizeStoredSession('expired', activeSession);
router.push({
pathname: '/task/timer',
params: {
tId: task?.tId,
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES),
} }
});
return;
} }
setContextMeta(nextContextMeta);
SetIsLoading(false);
}, [loadTaskStudyActivity]);
if (activeSession.taskId === task?.tId) { useFocusEffect(
router.push({ useCallback(() => {
pathname: '/task/timer', if (session && tId) {
params: { void GetTask(tId);
tId: activeSession.taskId ?? undefined, }
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES), }, [GetTask, session, tId])
}}); );
return;
const handleSprintStart = async () => {
const activeSession = await GetActiveSession();
if (!activeSession) {
router.push({
pathname: '/task/timer',
params: {
tId: task?.tId,
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES),
},
});
return;
}
const secondsLeft = Math.ceil((activeSession.endTime - Date.now()) / 1000);
if (secondsLeft <= 0) {
await finalizeStoredSession('expired', activeSession);
router.push({
pathname: '/task/timer',
params: {
tId: task?.tId,
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES),
},
});
return;
}
if (activeSession.taskId === task?.tId) {
router.push({
pathname: '/task/timer',
params: {
tId: activeSession.taskId ?? undefined,
durationMinutes: String(DEFAULT_FOCUS_DURATION_MINUTES),
},
});
return;
} }
Alert.alert( Alert.alert(
'Active session in progress', 'Active session in progress',
`End the current session and start a new ${DEFAULT_FOCUS_DURATION_MINUTES} minute sprint on this task?`, `End the current session and start a new ${DEFAULT_FOCUS_DURATION_MINUTES} minute sprint on this task?`,
[ [
{ text: 'Cancel', style: 'cancel', }, { text: 'Cancel', style: 'cancel' },
{ {
text: 'Start new sprint', text: 'Start new sprint',
style: 'destructive', style: 'destructive',
@@ -239,6 +203,47 @@ const handleSprintStart = async () => {
); );
}; };
const DeleteTask = async (taskId: string) => {
Alert.alert(
'Delete Task',
'Are you sure you want to delete this task?',
[
{
text: 'Cancel',
style: 'cancel',
},
{
text: 'Delete',
style: 'destructive',
onPress: async () => {
const { error } = await supabase
.from('tasks')
.delete()
.eq('tId', taskId);
if (error) {
Alert.alert('Task could not be deleted, please try again');
return;
}
const aId = task?.aId;
if (aId) {
try {
await CheckAssignmentCompletion(aId);
} catch {
Alert.alert('Failed to update assignment completion state');
}
}
Alert.alert('Task deleted successfully!');
router.back();
},
},
]
);
};
const colorSet = getSubjectColorSet(contextMeta.subjectColor); const colorSet = getSubjectColorSet(contextMeta.subjectColor);
if (isLoading) { if (isLoading) {
@@ -268,56 +273,41 @@ const handleSprintStart = async () => {
}} }}
/> />
<View
className="rounded-3xl bg-app-surface p-5"
style={{
borderWidth: 1,
borderColor: colorSet.strong,
}}
>
<Text className="text-2xl font-bold text-text-main">
Task not found
</Text>
<Text className="mt-2 text-base text-text-secondary">
The task could not be loaded.
</Text>
const DeleteTask = async (taskId: string) => { <Pressable
Alert.alert( className="mt-5 h-12 items-center justify-center rounded-2xl bg-accent"
'Delete Task', onPress={() => router.back()}
'Are you sure you want to delete this task?', >
[ <Text className="text-base font-bold text-text-inverse">
{ Go back
text: 'Cancel', </Text>
style: 'cancel', </Pressable>
}, </View>
{ </View>
text: 'Delete', );
style: 'destructive', }
onPress: async () => {
const { error } = await supabase
.from('tasks')
.delete()
.eq('tId', taskId);
if (error) { const isOwner = session?.user.id === task.uId;
Alert.alert('Task could not be deleted, please try again');
return;
}
const aId = task?.aId;
if (aId) {
try {
await CheckAssignmentCompletion(aId);
} catch {
Alert.alert('Failed to update assignment completion state');
}
}
Alert.alert('Task deleted successfully!');
router.back();
},
},
]
);
};
const colorSet = getSubjectColorSet(contextMeta.subjectColor);
if (!task) {
return ( return (
<View className="flex-1 bg-app-bg px-5 pt-6"> <View className="flex-1 bg-app-bg px-5 pt-6">
<Stack.Screen <Stack.Screen
options={{ options={{
title: 'Task Details', title: 'Task Details',
headerTitleAlign: 'center',
headerRight: () => ( headerRight: () => (
<Pressable <Pressable
className="rounded-full bg-app-subtle px-4 py-2" className="rounded-full bg-app-subtle px-4 py-2"
@@ -338,188 +328,141 @@ if (!task) {
borderColor: colorSet.strong, borderColor: colorSet.strong,
}} }}
> >
<Text className="text-2xl font-bold text-text-main"> <View className="flex-row items-start">
Task not found <View
</Text> className="mr-3 mt-1 h-6 w-6 items-center justify-center rounded-md border-2"
<Text className="mt-2 text-base text-text-secondary"> style={{
The task could not be loaded. borderColor: task.isCompleted ? colorSet.strong : '#DDD6C8',
</Text> backgroundColor: task.isCompleted ? colorSet.strong : '#EFEBE3',
}}
<Pressable
className="mt-5 h-12 items-center justify-center rounded-2xl bg-accent"
onPress={() => router.back()}
>
<Text className="text-base font-bold text-text-inverse">
Go back
</Text>
</Pressable>
</View>
</View>
);
}
const isOwner = session?.user.id === task.uId;
return (
<View className="flex-1 bg-app-bg px-5 pt-6">
<Stack.Screen
options={{
title: 'Task Details',
headerTitleAlign: 'center',
headerRight: () => (
<Pressable
className="rounded-full bg-app-subtle px-4 py-2"
onPress={async () => await supabase.auth.signOut()}
> >
<Text className="text-sm font-semibold text-text-secondary"> {task.isCompleted ? (
Logout <Text className="text-sm font-bold text-text-inverse"></Text>
</Text> ) : null}
</Pressable> </View>
),
}}
/>
<View <View className="flex-1">
className="rounded-3xl bg-app-surface p-5" <Text
style={{ className={`text-2xl font-bold ${
borderWidth: 1, task.isCompleted ? 'text-text-secondary' : 'text-text-main'
borderColor: colorSet.strong, }`}
}}
>
<View className="flex-row items-start">
<View
className="mr-3 mt-1 h-6 w-6 items-center justify-center rounded-md border-2"
style={{
borderColor: task.isCompleted ? colorSet.strong : '#DDD6C8',
backgroundColor: task.isCompleted ? colorSet.strong : '#EFEBE3',
}}
>
{task.isCompleted && (
<Text className="text-sm font-bold text-text-inverse"></Text>
)}
</View>
<View className="flex-1">
<Text
className={`text-2xl font-bold ${
task.isCompleted ? 'text-text-secondary' : 'text-text-main'
}`}
>
{task.title}
</Text>
{task.description ? (
<Text className="mt-3 text-base leading-6 text-text-secondary">
{task.description}
</Text>
) : (
<Text className="mt-3 text-base text-text-muted">
No description added.
</Text>
)}
<View className="mt-4 flex-row flex-wrap">
<View
className="mr-2 mb-2 rounded-full px-3 py-1"
style={{ backgroundColor: colorSet.soft }}
> >
<Text {task.title}
className="text-xs font-semibold" </Text>
style={{ color: colorSet.strong }}
{task.description ? (
<Text className="mt-3 text-base leading-6 text-text-secondary">
{task.description}
</Text>
) : (
<Text className="mt-3 text-base text-text-muted">
No description added.
</Text>
)}
<View className="mt-4 flex-row flex-wrap">
<View
className="mr-2 mb-2 rounded-full px-3 py-1"
style={{ backgroundColor: colorSet.soft }}
> >
{contextMeta.subjectTitle} <Text
</Text> className="text-xs font-semibold"
</View> style={{ color: colorSet.strong }}
>
<View className="mr-2 mb-2 rounded-full bg-app-subtle px-3 py-1"> {contextMeta.subjectTitle}
<Text className="text-xs font-semibold text-text-secondary">
{contextMeta.assignmentTitle}
</Text>
</View>
<View className="mr-2 mb-2 rounded-full bg-app-subtle px-3 py-1">
<Text className="text-xs font-semibold text-text-secondary">
Status: {task.isCompleted ? 'Completed' : 'Not completed'}
</Text>
</View>
</View>
<View className="mt-5 rounded-2xl bg-app-subtle p-4">
<Text className="text-sm font-semibold text-text-secondary">
Study activity
</Text>
<Text className="mt-1 text-xs leading-5 text-text-muted">
This tracks focused work on the task separately from whether the task is marked completed.
</Text>
<View className="mt-4 flex-row gap-3">
<View className="flex-1 rounded-2xl bg-app-surface px-4 py-3">
<Text className="text-xs font-semibold uppercase tracking-[0.6px] text-text-muted">
Focus time
</Text>
<Text className="mt-1 text-lg font-bold text-text-main">
{formatTrackedTime(task.totalTimeInSeconds ?? 0)}
</Text> </Text>
</View> </View>
<View className="flex-1 rounded-2xl bg-app-surface px-4 py-3"> <View className="mr-2 mb-2 rounded-full bg-app-subtle px-3 py-1">
<Text className="text-xs font-semibold uppercase tracking-[0.6px] text-text-muted"> <Text className="text-xs font-semibold text-text-secondary">
Completed sessions {contextMeta.assignmentTitle}
</Text> </Text>
<Text className="mt-1 text-lg font-bold text-text-main"> </View>
{completedFocusSessions}
<View className="mr-2 mb-2 rounded-full bg-app-subtle px-3 py-1">
<Text className="text-xs font-semibold text-text-secondary">
Status: {task.isCompleted ? 'Completed' : 'Not completed'}
</Text> </Text>
</View> </View>
</View> </View>
<View className="mt-5 rounded-2xl bg-app-subtle p-4">
<Text className="text-sm font-semibold text-text-secondary">
Study activity
</Text>
<Text className="mt-1 text-xs leading-5 text-text-muted">
This tracks focused work on the task separately from whether the task is marked completed.
</Text>
<View className="mt-4 flex-row gap-3">
<View className="flex-1 rounded-2xl bg-app-surface px-4 py-3">
<Text className="text-xs font-semibold uppercase tracking-[0.6px] text-text-muted">
Focus time
</Text>
<Text className="mt-1 text-lg font-bold text-text-main">
{formatTrackedTime(task.totalTimeInSeconds ?? 0)}
</Text>
</View>
<View className="flex-1 rounded-2xl bg-app-surface px-4 py-3">
<Text className="text-xs font-semibold uppercase tracking-[0.6px] text-text-muted">
Completed sessions
</Text>
<Text className="mt-1 text-lg font-bold text-text-main">
{completedFocusSessions}
</Text>
</View>
</View>
</View>
<Text className="mt-2 text-sm text-text-muted">
Last changed: {formatDateTime(task.lastChanged)}
</Text>
</View> </View>
<Text className="mt-2 text-sm text-text-muted">
Last changed: {formatDateTime(task.lastChanged)}
</Text>
</View> </View>
{isOwner ? (
<View className="mt-5 border-t border-app-border pt-5">
<Pressable
className="h-14 items-center justify-center rounded-2xl bg-accent"
onPress={handleSprintStart}
>
<Text className="text-base font-bold text-text-inverse">
Start Sprint
</Text>
</Pressable>
<Text className="mt-3 text-sm text-text-muted">
Starts a {DEFAULT_FOCUS_DURATION_MINUTES} minute focus sprint for this task.
</Text>
<View className="mt-4 flex-row">
<Pressable
className="mr-3 flex-1 items-center justify-center rounded-2xl border border-app-border bg-app-subtle py-3"
onPress={() =>
router.push({
pathname: '/task/upsertTask',
params: { tId: task.tId },
})
}
>
<Text className="text-sm font-bold text-text-secondary">
Edit
</Text>
</Pressable>
<Pressable
className="flex-1 items-center justify-center rounded-2xl border border-app-border bg-app-surface py-3"
onPress={() => DeleteTask(task.tId)}
>
<Text className="text-sm font-bold text-status-danger">
Delete
</Text>
</Pressable>
</View>
</View>
) : null}
</View> </View>
{isOwner && (
<View className="mt-5 border-t border-app-border pt-5">
<Pressable
className="h-14 items-center justify-center rounded-2xl bg-accent"
onPress={() => handleSprintStart()}
>
<Text className="text-base font-bold text-text-inverse">
Start Sprint
</Text>
</Pressable>
<Text className="mt-3 text-sm text-text-muted">
Starts a {DEFAULT_FOCUS_DURATION_MINUTES} minute focus sprint for this task.
</Text>
<View className="mt-4 flex-row">
<Pressable
className="mr-3 flex-1 items-center justify-center rounded-2xl border border-app-border bg-app-subtle py-3"
onPress={() =>
router.push({
pathname: '/task/upsertTask',
params: { tId: task.tId },
})
}
>
<Text className="text-sm font-bold text-text-secondary">
Edit
</Text>
</Pressable>
<Pressable
className="flex-1 items-center justify-center rounded-2xl border border-app-border bg-app-surface py-3"
onPress={() => DeleteTask(task.tId)}
>
<Text className="text-sm font-bold text-status-danger">
Delete
</Text>
</Pressable>
</View>
</View>
)}
</View> </View>
</View>
); );
} }