@@ -13,6 +13,12 @@ import { DurationChart, DurationData } from './duration-chart'
1313import { ProjectsChart , ProjectData } from './projects-chart'
1414import { GitAnalyticsChart , GitData } from './git-analytics-chart'
1515
16+ interface VercelMetrics {
17+ total_deployments : number
18+ success_rate : number
19+ error_rate : number
20+ }
21+
1622export default function VercelDashboard ( ) {
1723 const [ token ] = useQueryState ( 'token' )
1824 const [ timeRange , setTimeRange ] = useState ( 'daily' )
@@ -21,7 +27,7 @@ export default function VercelDashboard() {
2127 to : new Date ( )
2228 } )
2329
24- const [ isLoading , setIsLoading ] = useState ( true )
30+ const [ , setIsLoading ] = useState ( true )
2531 // eslint-disable-next-line @typescript-eslint/no-explicit-any
2632 const [ metrics , setMetrics ] = useState < any > ( )
2733 const [ deploymentsData , setDeploymentsData ] = useState < DeploymentsData [ ] > ( [ ] )
@@ -49,7 +55,7 @@ export default function VercelDashboard() {
4955 gitAnalyticsResult ,
5056
5157 ] = await Promise . all ( [
52- pipe ( token , 'vercel_deployment_metrics' , params ) ,
58+ pipe < { data : VercelMetrics [ ] } > ( token , 'vercel_deployment_metrics' , params ) ,
5359 pipe < { data : DeploymentsData [ ] } > ( token , 'vercel_deployments_over_time' , params ) ,
5460 pipe < { data : DurationData [ ] } > ( token , 'vercel_deployment_duration' , params ) ,
5561 pipe < { data : ProjectData [ ] } > ( token , 'vercel_project_stats' , params ) ,
0 commit comments