diff --git a/src/components/GoalTracker.tsx b/src/components/GoalTracker.tsx index 166266fc0..63e2a402f 100644 --- a/src/components/GoalTracker.tsx +++ b/src/components/GoalTracker.tsx @@ -141,6 +141,12 @@ export function useGoalTracker() { setCreating(true); setCreateError(null); + if (target <= 0) { + setCreateError("Target must be greater than 0."); + setCreating(false); + return; + } + try { const result = await submitGoalWithRefresh({ payload: { title, target, unit, recurrence, deadline: deadline || null }, diff --git a/src/types/repo-health.ts b/src/types/repo-health.ts index 4139d9ecf..22c0e1046 100644 --- a/src/types/repo-health.ts +++ b/src/types/repo-health.ts @@ -16,4 +16,3 @@ export interface RepoHealthScore { export interface RepoHealthResponse { repos: RepoHealthScore[]; } -