diff --git a/client-new/src/components/task/Actions.tsx b/client-new/src/components/task/Actions.tsx index ade6849..c4fc5b6 100644 --- a/client-new/src/components/task/Actions.tsx +++ b/client-new/src/components/task/Actions.tsx @@ -72,7 +72,6 @@ const FormComponent = ({ actions, subTaskName }: FormComponentProps) => { } }; - // return ( {actions.map((action, index) => ( diff --git a/client-new/src/screens/app/tasks/SubTaskScreen.tsx b/client-new/src/screens/app/tasks/SubTaskScreen.tsx index ac9219b..3999b13 100644 --- a/client-new/src/screens/app/tasks/SubTaskScreen.tsx +++ b/client-new/src/screens/app/tasks/SubTaskScreen.tsx @@ -1,5 +1,5 @@ import { getActions } from '@/services/ActionsService'; -import React from 'react'; +import React, { useEffect } from 'react'; import { useQuery } from '@tanstack/react-query'; import { Button, ScrollView, Text, View, HStack, Pressable } from 'native-base'; import Icon from "react-native-vector-icons/Ionicons"; @@ -10,6 +10,7 @@ import BackArrowIcon from '@/components/icons/BackArrow'; import ActivityLoader from '@/components/reusable/ActivityLoader'; import { heightPercentageToDP as h, widthPercentageToDP as w } from 'react-native-responsive-screen'; import { moderateScale, verticalScale } from '@/utils/FontSizeUtils'; +import NoTaskIcon from '@/components/icons/NoTaskIcon'; type SubTaskScreenProps = { route: any @@ -23,6 +24,10 @@ const SubTaskScreen = ({ route, navigation }: SubTaskScreenProps) => { queryFn: () => getActions(subtask?.id) }); + useEffect(() => { + console.log(data); + }, [data]); + return ( @@ -58,11 +63,27 @@ const SubTaskScreen = ({ route, navigation }: SubTaskScreenProps) => { {isLoading && } {error && error } - {data === null && null } - {data && data.actions && ( - - + {data === null || (data && Object.keys(data).length === 0) ? ( + + + + + No Actions Available (yet) + + ) : ( + data && data.actions && ( + + + + ) )}