Skip to content

Commit a0d08d6

Browse files
committed
metrics types
1 parent a2f4ea0 commit a0d08d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/web/src/components/tools/vercel/dashboard.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ import { DurationChart, DurationData } from './duration-chart'
1313
import { ProjectsChart, ProjectData } from './projects-chart'
1414
import { GitAnalyticsChart, GitData } from './git-analytics-chart'
1515

16+
interface VercelMetrics {
17+
total_deployments: number
18+
success_rate: number
19+
error_rate: number
20+
}
21+
1622
export 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

Comments
 (0)