fix: handle null in service status select onValueChange

TypeScript error: Select onValueChange passes string | null, not string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-25 16:44:49 -05:00
co-authored by Claude Sonnet 4.6
parent a81a01a06d
commit 5c3e3c4bc8
+2 -2
View File
@@ -74,8 +74,8 @@ export default function ServiceDetailPage() {
return () => { cancelled = true; };
}, [params.id, retryCounter]);
const changeStatus = async (newStatus: string) => {
if (!service || newStatus === service.status) return;
const changeStatus = async (newStatus: string | null) => {
if (!service || !newStatus || newStatus === service.status) return;
setUpdatingStatus(true);
try {
await api.patch(`/services/${params.id}/status`, { status: newStatus });