diff --git a/web/components/dashboard/UserStats.tsx b/web/components/dashboard/UserStats.tsx index 529514e..d5c8126 100644 --- a/web/components/dashboard/UserStats.tsx +++ b/web/components/dashboard/UserStats.tsx @@ -1,4 +1,4 @@ -import { Box, SimpleGrid, chakra } from '@chakra-ui/react' +import { Box, Grid, GridItem, SimpleGrid, chakra } from '@chakra-ui/react' import React, { useEffect } from 'react' import { useSelector } from 'react-redux' import { selectAuthUser } from '../../store/authSlice' @@ -13,8 +13,12 @@ import { useAppDispatch, useAppSelector } from '../../store/hooks' const UserStats = () => { const authUser = useSelector(selectAuthUser) - const { totalApiKeyCount, totalDeviceCount, totalSMSCount } = - useAppSelector(selectStatsData) + const { + totalApiKeyCount, + totalDeviceCount, + totalReceivedSMSCount, + totalSentSMSCount, + } = useAppSelector(selectStatsData) const statsLoading = useAppSelector(selectStatsLoading) const dispatch = useAppDispatch() @@ -25,31 +29,47 @@ const UserStats = () => { return ( <> - - - - Welcome {authUser?.name} - - - - - - - + + + + + Welcome {authUser?.name} + + + + + + + + + + + ) diff --git a/web/store/statsSlice.ts b/web/store/statsSlice.ts index 896044f..4b23f6d 100644 --- a/web/store/statsSlice.ts +++ b/web/store/statsSlice.ts @@ -11,7 +11,8 @@ const initialState = { data: { totalApiKeyCount: 0, totalDeviceCount: 0, - totalSMSCount: 0, + totalReceivedSMSCount: 0, + totalSentSMSCount: 0, }, }