File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import MemberStatistic from './components/memberStatistic';
88import { useParams } from 'react-router-dom' ;
99import { useNavigate } from 'react-router-dom' ;
1010import { DomainUser } from '@/api/types' ;
11+ import { v1LicenseList } from '@/api' ;
1112
1213export type TimeRange = '90d' | '24h' ;
1314
@@ -17,7 +18,9 @@ const Dashboard = () => {
1718 const [ tabValue , setTabValue ] = useState ( tab || 'global' ) ;
1819 const [ memberData , setMemberData ] = useState < DomainUser | null > ( null ) ;
1920 const [ timeRange , setTimeRange ] = useState < TimeRange > ( '24h' ) ;
20-
21+ const license = useRequest ( ( ) => {
22+ return v1LicenseList ( { } )
23+ } ) . data
2124 const { data : userData , refresh } = useRequest (
2225 ( ) =>
2326 getListUser ( {
@@ -87,7 +90,7 @@ const Dashboard = () => {
8790 size = 'small'
8891 onChange = { ( e ) => setTimeRange ( e . target . value as TimeRange ) }
8992 sx = { { fontSize : 14 } }
90- disabled
93+ disabled = { license ?. edition !== 2 }
9194 >
9295 < MenuItem value = '24h' > 最近 24 小时</ MenuItem >
9396 < MenuItem value = '90d' > 最近 90 天</ MenuItem >
You can’t perform that action at this time.
0 commit comments