diff --git a/src/component/home/RecentActions.jsx b/src/component/home/RecentActions.jsx index d77970c..56fada0 100644 --- a/src/component/home/RecentActions.jsx +++ b/src/component/home/RecentActions.jsx @@ -5,11 +5,11 @@ import queryKeys from "../../services/queryKeys"; export default function RecentActions() { - const {data, isFetching, isError, error} = useQuery({ + const {data:dataAction, isFetching, isError, error} = useQuery({ queryKey: queryKeys.recentAction, - queryFn: async () => await recentActions() + queryFn: () => recentActions() }) -console.log('data', error) + return ( <>
@@ -41,7 +41,7 @@ console.log('data', error)

Last Update

-

10-10-2021 10 AM

+

{dataAction?.data?.action_data?.last_update}

{/**/} @@ -60,19 +60,19 @@ console.log('data', error)

Initial

-

0

+

{dataAction?.data?.action_data?.initial}

Processing

-

0

+

{dataAction?.data?.action_data?.processing}

Verifying

-

0

+

{dataAction?.data?.action_data?.verifying}

Completed

-

0

+

{dataAction?.data?.action_data?.completed}

@@ -86,39 +86,19 @@ console.log('data', error) - - 1 - Smith Drake - 27/3/2014 - - - - - - 2 - Martha Doe - 28/3/2015 - - - - - - 3 - Fenish Paul - 24/3/2015 - - - - - - 4 - Albom Mitch - 29/3/2016 - - - - - + {dataAction?.data?.action_data?.actions.map((action, index) => { + let bgColor = action?.status == 'completed' ? 'badge-success-inverse' : action?.status == 'verifying' ? 'badge-info-inverse' : action?.status == 'processing' ? 'badge-warning-inverse' : 'badge-primary-inverse' + return ( + + {action?.no} + {action?.description} + {action?.date} + + + + + ) + })}