File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
src/widgets/dashboard/users/user-usage-modal Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ import {
2020 Text ,
2121 Tooltip
2222} from '@mantine/core'
23- import { TbChartBar as IconChartBar , TbChevronLeft , TbChevronRight } from 'react-icons/tb'
23+ import {
24+ TbChartBar as IconChartBar ,
25+ TbChevronLeft ,
26+ TbChevronRight ,
27+ TbRefresh
28+ } from 'react-icons/tb'
2429import { GetUserUsageByRangeCommand } from '@remnawave/backend-contract'
2530import { PiEmpty , PiListBullets } from 'react-icons/pi'
2631import { BarChart , Sparkline } from '@mantine/charts'
@@ -75,7 +80,12 @@ export const UserUsageModalWidget = (props: IProps) => {
7580 setDateRange ( [ start , end ] )
7681 } , [ period ] )
7782
78- const { data : userUsage , isLoading } = useGetUserUsageByRange ( {
83+ const {
84+ data : userUsage ,
85+ isLoading,
86+ refetch,
87+ isRefetching
88+ } = useGetUserUsageByRange ( {
7989 route : {
8090 uuid : userUuid
8191 } ,
@@ -522,6 +532,14 @@ export const UserUsageModalWidget = (props: IProps) => {
522532 value = { period }
523533 w = { { base : 130 } }
524534 />
535+ < ActionIcon
536+ loading = { isRefetching }
537+ onClick = { ( ) => refetch ( ) }
538+ size = "input-sm"
539+ variant = "subtle"
540+ >
541+ < TbRefresh size = { 20 } />
542+ </ ActionIcon >
525543 </ Group >
526544
527545 < SimpleGrid cols = { { base : 1 , sm : 2 } } spacing = "md" >
You can’t perform that action at this time.
0 commit comments